From 640eb27564eda215ab575875faef574300d7573f Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 27 Mar 2008 00:58:32 +0000 Subject: [PATCH] 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 --- .../com/threerings/crowd/client/LocationDirector.as | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/as/com/threerings/crowd/client/LocationDirector.as b/src/as/com/threerings/crowd/client/LocationDirector.as index 703ea4ce8..c1e071c7a 100644 --- a/src/as/com/threerings/crowd/client/LocationDirector.as +++ b/src/as/com/threerings/crowd/client/LocationDirector.as @@ -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; }