]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch #561454, testing for scrollbar
authorJulian Smart <julian@anthemion.co.uk>
Wed, 29 May 2002 08:31:59 +0000 (08:31 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 29 May 2002 08:31:59 +0000 (08:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/window.cpp

index e51b353f980b61795fd9209a41ff9bc859bbc48d..3d778a7fa6b9b76ea112a5c390722c1d347e0806 100644 (file)
@@ -817,8 +817,9 @@ int wxWindow::GetScrollRange(int orient) const
     Widget scrollBar = (Widget)GetScrollbar((wxOrientation)orient);
     wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
 
-    int range;
-    XtVaGetValues(scrollBar, XmNmaximum, &range, NULL);
+    int range = 0;
+    if (scrollBar) 
+        XtVaGetValues(scrollBar, XmNmaximum, &range, NULL);
     return range;
 }