X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6b5d017e8fb3be050aa1c4e23267b189c2b41e98..d86ab8e29f25edc23e99725f7474c95120e8f862:/src/motif/window.cpp 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; }