From c4cb3d0f0c41ce86112cf704b3f37f87130e78cf Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 29 May 2002 08:31:59 +0000 Subject: [PATCH] Applied patch #561454, testing for scrollbar git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/window.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/motif/window.cpp b/src/motif/window.cpp index e51b353f98..3d778a7fa6 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -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; } -- 2.45.2