]> git.saurik.com Git - wxWidgets.git/commitdiff
added a check that we have a non-NULL scrollbar in wxScrollBarCallback()
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 Mar 2007 13:39:24 +0000 (13:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 30 Mar 2007 13:39:24 +0000 (13:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/scrolbar.cpp
src/motif/window.cpp

index 5b19681cf389a3c095d49a802c4162fb09984cef..6cbdf29c23e300da9c6e4353ab4ca48a424a44a3 100644 (file)
@@ -125,6 +125,8 @@ static void wxScrollBarCallback(Widget widget, XtPointer clientData,
                                 XmScaleCallbackStruct *cbs)
 {
     wxScrollBar *scrollBar = (wxScrollBar*)wxGetWindowFromTable(widget);
+    wxCHECK_RET( scrollBar, _T("invalid widget in scrollbar callback") );
+
     wxOrientation orientation = (wxOrientation)wxPtrToUInt(clientData);
     wxEventType eventType = wxEVT_NULL;
 
index 66428802a980a28d32767ebca7a04c74fb33f4f5..a99a8bb706d626f519aa6d448a0a2ab045ff800e 100644 (file)
@@ -2088,6 +2088,8 @@ static void wxScrollBarCallback(Widget scrollbar,
                                 XmScrollBarCallbackStruct *cbs)
 {
     wxWindow *win = wxGetWindowFromTable(scrollbar);
+    wxCHECK_RET( win, _T("invalid widget in scrollbar callback") );
+
     wxOrientation orientation = (wxOrientation)wxPtrToUInt(clientData);
 
     wxEventType eventType = wxEVT_NULL;