Deal gracefully with moving to a non-existent location.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1385 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ChatDirector.java,v 1.20 2002/04/30 17:27:30 mdb Exp $
|
||||
// $Id: ChatDirector.java,v 1.21 2002/05/22 21:44:54 shaper Exp $
|
||||
|
||||
package com.threerings.crowd.chat;
|
||||
|
||||
@@ -186,7 +186,9 @@ public class ChatDirector
|
||||
|
||||
// listen to the new object
|
||||
_place = place;
|
||||
_place.addListener(this);
|
||||
if (_place != null) {
|
||||
_place.addListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: OccupantDirector.java,v 1.1 2002/04/15 14:38:45 shaper Exp $
|
||||
// $Id: OccupantDirector.java,v 1.2 2002/05/22 21:47:14 shaper Exp $
|
||||
|
||||
package com.threerings.crowd.client;
|
||||
|
||||
@@ -118,13 +118,15 @@ public class OccupantDirector
|
||||
|
||||
// listen to the new one
|
||||
_place = place;
|
||||
_place.addListener(this);
|
||||
if (_place != null) {
|
||||
_place.addListener(this);
|
||||
|
||||
// cache the occupant info for the occupants in this room
|
||||
Iterator iter = _place.occupantInfo.entries();
|
||||
while (iter.hasNext()) {
|
||||
OccupantInfo info = (OccupantInfo)iter.next();
|
||||
_ocache.put(info.getBodyOid(), info);
|
||||
// cache the occupant info for the occupants in this room
|
||||
Iterator iter = _place.occupantInfo.entries();
|
||||
while (iter.hasNext()) {
|
||||
OccupantInfo info = (OccupantInfo)iter.next();
|
||||
_ocache.put(info.getBodyOid(), info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user