X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/937013e0fd914d4c42f9f5ec98da665986b93dfa..74b1f0b45e0f0bc7e25c5f32bb495e3e4bcd3392:/src/os2/spinctrl.cpp diff --git a/src/os2/spinctrl.cpp b/src/os2/spinctrl.cpp index 1777cda78b..c9d8187d94 100644 --- a/src/os2/spinctrl.cpp +++ b/src/os2/spinctrl.cpp @@ -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; @@ -296,7 +299,7 @@ wxSpinCtrl* wxSpinCtrl::GetSpinForTextCtrl( // 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