Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit 99ddda4

Browse files
committed
fix NPE when getting an not cached entity in cache
1 parent 59bd18f commit 99ddda4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

proxy/src/main/java/org/dragonet/proxy/network/cache/EntityCache.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ public CachedEntity getClientEntity() {
6767
}
6868

6969
public CachedEntity getByRemoteEID(long eid) {
70+
if (!mapRemoteToClient.containsKey(eid))
71+
{
72+
return null;
73+
}
7074
long proxyEid = mapRemoteToClient.get(eid);
7175
return entities.get(proxyEid);
7276
}

0 commit comments

Comments
 (0)