mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
protect against calling announceGenerate() and disable() twice
This commit is contained in:
parent
df408c942f
commit
3f42589532
@ -143,6 +143,7 @@ class DistributedObject(PandaObject):
|
|||||||
generated and all of its required fields filled in.
|
generated and all of its required fields filled in.
|
||||||
"""
|
"""
|
||||||
assert(self.notify.debug('announceGenerate(): %s' % (self.doId)))
|
assert(self.notify.debug('announceGenerate(): %s' % (self.doId)))
|
||||||
|
if self.activeState != ESGenerated:
|
||||||
self.activeState = ESGenerated
|
self.activeState = ESGenerated
|
||||||
messenger.send(self.uniqueName("generate"), [self])
|
messenger.send(self.uniqueName("generate"), [self])
|
||||||
|
|
||||||
@ -151,6 +152,7 @@ class DistributedObject(PandaObject):
|
|||||||
Inheritors should redefine this to take appropriate action on disable
|
Inheritors should redefine this to take appropriate action on disable
|
||||||
"""
|
"""
|
||||||
assert(self.notify.debug('disable(): %s' % (self.doId)))
|
assert(self.notify.debug('disable(): %s' % (self.doId)))
|
||||||
|
if self.activeState != ESDisabled:
|
||||||
self.activeState = ESDisabled
|
self.activeState = ESDisabled
|
||||||
self.__callbacks = {}
|
self.__callbacks = {}
|
||||||
if wantOtpServer:
|
if wantOtpServer:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user