X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61a028dc4af537da90fd52935a75afc9056ecd09..ec080ef1873995bcd9b20b0fc1a6d208a78540d3:/src/os2/spinbutt.cpp diff --git a/src/os2/spinbutt.cpp b/src/os2/spinbutt.cpp index c176baa141..533b209728 100644 --- a/src/os2/spinbutt.cpp +++ b/src/os2/spinbutt.cpp @@ -63,8 +63,11 @@ bool wxSpinButton::Create( 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; @@ -194,7 +197,7 @@ bool wxSpinButton::OS2OnScroll( int WXUNUSED(nOrientation), vEvent.SetPosition(nVal); vEvent.SetEventObject(this); - return(GetEventHandler()->ProcessEvent(vEvent)); + return(HandleWindowEvent(vEvent)); } // end of wxSpinButton::OS2OnScroll bool wxSpinButton::OS2Command( WXUINT WXUNUSED(uCmd),