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):
|
def setGuiGridSpacing(spacing):
|
||||||
DirectGuiWidget.gridSpacing = 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
|
# this will help track down the code that created DirectGui objects
|
||||||
# call obj.getCreationStackTrace() to figure out what code created it
|
# call obj.getCreationStackTrace() to figure out what code created it
|
||||||
DirectGuiBase = recordCreationStack(DirectGuiBase)
|
DirectGuiBase = recordCreationStack(DirectGuiBase)
|
||||||
|
@ -76,9 +76,14 @@ class Task:
|
|||||||
debugTaskTraceback = 0 # base.config.GetBool('debug-task-traceback', 0)
|
debugTaskTraceback = 0 # base.config.GetBool('debug-task-traceback', 0)
|
||||||
count = 0
|
count = 0
|
||||||
def __init__(self, callback, priority = 0):
|
def __init__(self, callback, priority = 0):
|
||||||
if __dev__:
|
try:
|
||||||
if self.debugTaskTraceback:
|
config
|
||||||
self.debugInitTraceback = StackTrace("Task "+str(callback), 1, 10)
|
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
|
# Unique ID for each task
|
||||||
self.id = Task.count
|
self.id = Task.count
|
||||||
Task.count += 1
|
Task.count += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user