X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7403ad2d154a8e2974fdc5fc215258f3a75cdde..1ffc8d7a55af1c253ca363bb0fbdda26bb4c9c65:/wxPython/wx/lib/wxPlotCanvas.py

diff --git a/wxPython/wx/lib/wxPlotCanvas.py b/wxPython/wx/lib/wxPlotCanvas.py
index dd7e425260..8b96c6e0e2 100644
--- a/wxPython/wx/lib/wxPlotCanvas.py
+++ b/wxPython/wx/lib/wxPlotCanvas.py
@@ -51,14 +51,13 @@ imported.  It probably is not installed (it's not part of the standard
 Python distribution). See the Python site (http://www.python.org) for
 information on downloading source or binaries."""
 
-    if wx.Platform == '__WXMSW__':
+    print msg
+    if wx.Platform == '__WXMSW__' and wx.GetApp() is not None:
         d = wx.MessageDialog(None, msg, "Numeric not found")
         if d.ShowModal() == wx.ID_CANCEL:
             d = wx.MessageDialog(None, "I kid you not! Pressing Cancel won't help you!", "Not a joke", wx.OK)
             d.ShowModal()
-    else:
-        print msg
-    raise ImportError
+    raise
 
 #
 # Plotting classes...