Make leavePlace() properly NOOP if we're not in a place.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4980 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-03-27 00:58:32 +00:00
parent 4d77995e06
commit 640eb27564
@@ -211,11 +211,14 @@ public class LocationDirector extends BasicDirector
return false;
}
_lservice.leavePlace(_cctx.getClient());
didLeavePlace();
// if we're not actually in a place, then no need to do anything
if (_placeId < 0) {
_lservice.leavePlace(_cctx.getClient());
didLeavePlace();
// let our observers know that we're no longer in a location
_observers.apply(didChangeOp);
// let our observers know that we're no longer in a location
_observers.apply(didChangeOp);
}
return true;
}