X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4a61305d364dcf229395fb223daec31e2d6efcb4..fa72af694e25aa85cdb039ccd1fb63a93c1219c3:/wxPython/demo/dllwidget/test_prog.py

diff --git a/wxPython/demo/dllwidget/test_prog.py b/wxPython/demo/dllwidget/test_prog.py
index 42991bd8fc..bd54f16cd2 100644
--- a/wxPython/demo/dllwidget/test_prog.py
+++ b/wxPython/demo/dllwidget/test_prog.py
@@ -36,14 +36,16 @@ class TestFrame(wxFrame):
                                    "TestWindow",
                                    size=(250, 150))
 
-        # The embedded window is the one exported from the DLL
-        print dw.GetEmbeddedWindow().GetClassName()
-
-        # This shows that we can give it a child from this side of things.
-        # You can also call any wxWindow methods on it too.
-        wxStaticText(dw.GetEmbeddedWindow(), -1,
-                     "Loaded from test_dll...", pos=(10,10))
-
+        if dw.Ok():
+            # The embedded window is the one exported from the DLL
+            print dw.GetWidgetWindow().GetClassName()
+
+            # This shows that we can give it a child from this side of things.
+            # You can also call any wxWindow methods on it too.
+            wxStaticText(dw.GetWidgetWindow(), -1,
+                         "Loaded from test_dll...", pos=(10,10))
+        else:
+            wxStaticText(dw, -1, "ERROR!!!!", pos=(20,20))
 
         sizer = wxBoxSizer(wxVERTICAL)
         sizer.Add(wxStaticLine(panel, -1), 0, wxGROW)