]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/spinbutt.cpp
remove unused variables, minor cleanup
[wxWidgets.git] / src / os2 / spinbutt.cpp
index c176baa1419049717574e1ef8a87c3fb69c2fa51..533b209728ae3466a5c77174d234491e21ad510e 100644 (file)
@@ -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),