]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/spinctrl.cpp
using on all OSX variants
[wxWidgets.git] / src / os2 / spinctrl.cpp
index 1777cda78b95be3b3b7088b1c5f32cd76304c0da..c9d8187d9444bd7a0adee11f200061757b401769 100644 (file)
@@ -126,8 +126,11 @@ bool wxSpinCtrl::Create( wxWindow*       pParent,
         m_windowId = NewControlId();
     else
         m_windowId = vId;
         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;
     SetName(rsName);
     SetParent(pParent);
     m_windowStyle      = lStyle;
@@ -296,7 +299,7 @@ wxSpinCtrl* wxSpinCtrl::GetSpinForTextCtrl(
 
     // sanity check
     wxASSERT_MSG( pSpin->m_hWndBuddy == hWndBuddy,
 
     // sanity check
     wxASSERT_MSG( pSpin->m_hWndBuddy == hWndBuddy,
-                  _T("wxSpinCtrl has incorrect buddy HWND!") );
+                  wxT("wxSpinCtrl has incorrect buddy HWND!") );
 
     return pSpin;
 } // end of wxSpinCtrl::GetSpinForTextCtrl
 
     return pSpin;
 } // end of wxSpinCtrl::GetSpinForTextCtrl