]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/spinctrl.cpp
Use _UNICODE instead of UNICODE in wx/msw/winundef.h.
[wxWidgets.git] / src / os2 / spinctrl.cpp
index 72d677a720fb1af74c162dbca49fa5e6f213e6cb..c9d8187d9444bd7a0adee11f200061757b401769 100644 (file)
@@ -126,8 +126,11 @@ bool wxSpinCtrl::Create( wxWindow*       pParent,
         m_windowId = NewControlId();
     else
         m_windowId = vId;
-    m_backgroundColour = pParent->GetBackgroundColour();
-    m_foregroundColour = pParent->GetForegroundColour();
+    if (pParent)
+    {
+        m_backgroundColour = pParent->GetBackgroundColour();
+        m_foregroundColour = pParent->GetForegroundColour();
+    }
     SetName(rsName);
     SetParent(pParent);
     m_windowStyle      = lStyle;