From bca98f73d356a1817fbed4645a738a82085383be Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 25 Feb 2004 19:41:38 +0000 Subject: [PATCH] better handling of window failure --- direct/src/showbase/ShowBase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 4d86a42168..4ce579c682 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -378,6 +378,7 @@ class ShowBase(DirectObject.DirectObject): self.nextWindowIndex += 1 # Temporary try .. except for old Pandas. + win = None try: if type == 'onscreen': 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 # figure any app that includes ShowBase really wants to # 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)