mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
distributed: Fix broken reference to StackTrace when __debug__==False
This commit is contained in:
parent
9d05044a9f
commit
f062c64e9a
@ -4,7 +4,6 @@ from panda3d.core import *
|
||||
from panda3d.direct import *
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.distributed.DistributedObjectBase import DistributedObjectBase
|
||||
from direct.showbase.PythonUtil import StackTrace
|
||||
#from PyDatagram import PyDatagram
|
||||
#from PyDatagramIterator import PyDatagramIterator
|
||||
|
||||
@ -259,7 +258,10 @@ class DistributedObject(DistributedObjectBase):
|
||||
def _destroyDO(self):
|
||||
# after this is called, the object is no longer a DistributedObject
|
||||
# but may still be used as a DelayDeleted object
|
||||
self.destroyDoStackTrace = StackTrace()
|
||||
if __debug__:
|
||||
# StackTrace is omitted in packed versions
|
||||
from direct.showbase.PythonUtil import StackTrace
|
||||
self.destroyDoStackTrace = StackTrace()
|
||||
# check for leftover cached data that was not retrieved or flushed by this object
|
||||
# this will catch typos in the data name in calls to get/setCachedData
|
||||
if hasattr(self, '_cachedData'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user