]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/img2png.py
Make the app object be global in case it is run multiple times, such
[wxWidgets.git] / wxPython / wx / tools / img2png.py
index 2f5bc8baab0620161c15b1dcef7762e7ba7f744e..69fa69c12d9ddf01e00d2e47582194c26d3e2467 100644 (file)
@@ -40,10 +40,11 @@ import  sys
 import  wx
 import  img2img
 
-
+app = None
 def main():
     # some bitmap related things need to have a wxApp initialized...
     if wx.GetApp() is None:
+        global app
         app = wx.PySimpleApp()
     img2img.main(sys.argv[1:], wx.BITMAP_TYPE_PNG, ".png", __doc__)