Fix yohoho singleplayer NPE boochery caused by unsafe direct call on DObjectManager
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4636 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -37,6 +37,7 @@ import com.threerings.presents.net.BootstrapData;
|
||||
import com.threerings.presents.net.Credentials;
|
||||
import com.threerings.presents.net.PingRequest;
|
||||
import com.threerings.presents.net.PongResponse;
|
||||
import com.threerings.presents.server.LocalDObjectMgr;
|
||||
|
||||
/**
|
||||
* Through the client object, a connection to the system is established and maintained. The client
|
||||
@@ -619,6 +620,7 @@ public class Client
|
||||
// clear out our references
|
||||
_comm = null;
|
||||
_omgr = null;
|
||||
LocalDObjectMgr.clomgr = null;
|
||||
_clobj = null;
|
||||
_cloid = -1;
|
||||
_standalone = false;
|
||||
|
||||
@@ -45,7 +45,7 @@ public class LocalDObjectMgr extends PresentsDObjectMgr
|
||||
*/
|
||||
public DObjectManager getClientDObjectMgr (final int clientOid)
|
||||
{
|
||||
return new DObjectManager() {
|
||||
clomgr = new DObjectManager() {
|
||||
public boolean isManager (DObject object) {
|
||||
return LocalDObjectMgr.this.isManager(object);
|
||||
}
|
||||
@@ -65,6 +65,7 @@ public class LocalDObjectMgr extends PresentsDObjectMgr
|
||||
LocalDObjectMgr.this.removedLastSubscriber(obj, deathWish);
|
||||
}
|
||||
};
|
||||
return clomgr;
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
@@ -92,4 +93,6 @@ public class LocalDObjectMgr extends PresentsDObjectMgr
|
||||
// accounting data
|
||||
EventQueue.invokeLater(unit);
|
||||
}
|
||||
|
||||
public static DObjectManager clomgr = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user