mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
better handling of window failure
This commit is contained in:
parent
232f9395bf
commit
bca98f73d3
@ -378,6 +378,7 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
self.nextWindowIndex += 1
|
self.nextWindowIndex += 1
|
||||||
|
|
||||||
# Temporary try .. except for old Pandas.
|
# Temporary try .. except for old Pandas.
|
||||||
|
win = None
|
||||||
try:
|
try:
|
||||||
if type == 'onscreen':
|
if type == 'onscreen':
|
||||||
win = self.graphicsEngine.makeWindow(gsg, name, 0)
|
win = self.graphicsEngine.makeWindow(gsg, name, 0)
|
||||||
@ -487,7 +488,7 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
# This doesn't really need to be an error condition, but I
|
# This doesn't really need to be an error condition, but I
|
||||||
# figure any app that includes ShowBase really wants to
|
# figure any app that includes ShowBase really wants to
|
||||||
# have a window open.
|
# have a window open.
|
||||||
self.notify.error("Unable to open %s window." % (self.windowType))
|
self.notify.error("Unable to open '%s' window." % (self.windowType))
|
||||||
|
|
||||||
return (self.win != None)
|
return (self.win != None)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user