From a59cd33490bd9e1f4b916f3516062a2f7d07f550 Mon Sep 17 00:00:00 2001 From: noisymime Date: Wed, 2 Jul 2008 11:51:10 +0000 Subject: [PATCH] - Fix GUI size check crashing if setting did not exist --- gloss.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gloss.py b/gloss.py index 9d0e64e..0cae0bf 100644 --- a/gloss.py +++ b/gloss.py @@ -63,8 +63,15 @@ class MainApp: self.connected = True #Do an initial lookup for GUI size - width = int(self.dbMgr.get_setting("GuiWidth")) - height = int(self.dbMgr.get_setting("GuiHeight")) + (width, height) = (self.dbMgr.get_setting("GuiWidth"), self.dbMgr.get_setting("GuiHeight")) + if not width is None: + width = int(width) + else: + width = 0 + if not height is None: + height = int(height) + else: + height = 0 #Set stage size if width == 0 and height == 0: self.stage.fullscreen()