]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for motif /scintilla bugs
authorChris Elliott <biol75@york.ac.uk>
Fri, 7 May 2004 16:11:22 +0000 (16:11 +0000)
committerChris Elliott <biol75@york.ac.uk>
Fri, 7 May 2004 16:11:22 +0000 (16:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/frame.cpp
src/motif/window.cpp

index 29cc119131b989737e7c66842e6c446deaa0731b..7b325f41da6f8e4c12d93e87c6500e3d0318187c 100644 (file)
@@ -355,7 +355,12 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
             yy -= tbh;
     }
 #endif // wxUSE_TOOLBAR
-    *x = xx; *y = yy;
+
+//CE found a call here with NULL y pointer
+    if (x)
+        *x = xx; 
+    if (y)
+        *y = yy;
 }
 
 // Set the client size (i.e. leave the calculation of borders etc.
index f6fa06cdbac6c5b7ec1f0d6b36bb53c0275e8b2b..fb6a636e1aa37ba673ce22a757fd99a5034f5415 100644 (file)
@@ -757,7 +757,9 @@ int wxWindow::GetScrollPos(int orient) const
 int wxWindow::GetScrollRange(int orient) const
 {
     Widget scrollBar = (Widget)GetScrollbar((wxOrientation)orient);
-    wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
+    // CE scintilla windows don't always have these scrollbars 
+    // and it tends to pile up a whole bunch of asserts
+    //wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
 
     int range = 0;
     if (scrollBar) 
@@ -768,10 +770,11 @@ int wxWindow::GetScrollRange(int orient) const
 int wxWindow::GetScrollThumb(int orient) const
 {
     Widget scrollBar = (Widget)GetScrollbar((wxOrientation)orient);
-    wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
+    //wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
 
-    int thumb;
-    XtVaGetValues(scrollBar, XmNsliderSize, &thumb, NULL);
+    int thumb = 0;
+    if (scrollBar)
+        XtVaGetValues(scrollBar, XmNsliderSize, &thumb, NULL);
     return thumb;
 }