Once a table is purged, stop listening to the game object, otherwise we get warnings when the game goes away or the occupants change. purgeTable is called from a number of places, apparently sometimes before unmapTable
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@796 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -344,10 +344,19 @@ public class TableManager
|
||||
}
|
||||
|
||||
// remove the mapping by gameOid
|
||||
_goidMap.remove(table.gameOid); // no-op if gameOid == 0
|
||||
Table removed = _goidMap.remove(table.gameOid); // no-op if gameOid == 0
|
||||
|
||||
// remove the table from the lobby object
|
||||
_tlobj.removeFromTables(table.tableId);
|
||||
|
||||
// remove the listener too so we do not get a request later on to update the occupants or
|
||||
// unmap this table
|
||||
if (removed != null) {
|
||||
DObject gameObj = _omgr.getObject(table.gameOid);
|
||||
if (gameObj != null) {
|
||||
gameObj.removeListener(_gameListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user