otp: Don't crash if avId isn't found in the limiter's dicts.

This commit is contained in:
Harvir 2014-03-29 13:34:17 +00:00
parent bffcb8d870
commit 061642a354

View file

@ -99,13 +99,14 @@ class TLGatherAllAvs(DirectObject):
base.cr.telemetryLimiter.addObj(av)
def _handlePlayerLeave(self, av):
if av is not localAvatar and base.cr.telemetryLimiter.hasObj(av):
if av is not localAvatar and base.cr.telemetryLimiter.hasObj(av) and av.doId in self._avId2limits:
base.cr.telemetryLimiter.removeObj(av)
for limit in self._avId2limits[av.doId]:
av.removeTelemetryLimit(limit)
del self._avId2limits[av.doId]
del self._avs[av.doId]
if av.doId in self._avs:
del self._avs[av.doId]
def destroy(self):
self.ignoreAll()