mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix startup crash
This commit is contained in:
parent
f191acace1
commit
7e54ae47b7
@ -651,7 +651,10 @@ def toggleGuiGridSnap():
|
||||
def setGuiGridSpacing(spacing):
|
||||
DirectGuiWidget.gridSpacing = spacing
|
||||
|
||||
if __dev__:
|
||||
# this should trigger off of __dev__, but it's not available at this point.
|
||||
# __debug__ works because the production client is not __debug__ and the
|
||||
# production AI doesn't create any GUI.
|
||||
if config.GetBool('record-gui-creation-stack', __debug__):
|
||||
# this will help track down the code that created DirectGui objects
|
||||
# call obj.getCreationStackTrace() to figure out what code created it
|
||||
DirectGuiBase = recordCreationStack(DirectGuiBase)
|
||||
|
@ -76,7 +76,12 @@ class Task:
|
||||
debugTaskTraceback = 0 # base.config.GetBool('debug-task-traceback', 0)
|
||||
count = 0
|
||||
def __init__(self, callback, priority = 0):
|
||||
if __dev__:
|
||||
try:
|
||||
config
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
if config.GetBool('record-task-creation-stack', __dev__):
|
||||
if self.debugTaskTraceback:
|
||||
self.debugInitTraceback = StackTrace("Task "+str(callback), 1, 10)
|
||||
# Unique ID for each task
|
||||
|
Loading…
x
Reference in New Issue
Block a user