7439: pre-load alert dialogs crash w/o DISPLAY

This commit is contained in:
Paul Franklin
2014-02-04 20:22:47 -08:00
parent e4abd21dae
commit 7f757e0304

View File

@@ -27,6 +27,8 @@
#
#------------------------------------------------------------------------
from constfunc import has_display
if has_display():
try :
import osmgpsmap
OSMGPSMAP = True
@@ -44,6 +46,8 @@ except:
title = _("OsmGpsMap module not loaded.")
message = _("Geography functionality will not be available.")
MessageHideDialog(title, message, 'interface.ignore-osmgpsmap')
else:
OSMGPSMAP = False
if OSMGPSMAP:
# Load the view only if osmgpsmap library is present.