Skip to content
Snippets Groups Projects
Commit 25a53678 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Settings functions check to see if a wx.App exists, and do nothing if

not.
parent bd93bbc0
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,9 @@ def read(name, default=None):
try: import wx
except: return None
if wx.GetApp() is None:
return None
config = wx.Config('fsleyes')
value = config.Read(name)
......@@ -28,7 +31,10 @@ def read(name, default=None):
def write(name, value):
try: import wx
except: return None
except: return
if wx.GetApp() is None:
return
value = str(value)
config = wx.Config('fsleyes')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment