From f6fb552e5da7ea4b373b96bc22138ecb46d97390 Mon Sep 17 00:00:00 2001 From: "Unknown (NI)" Date: Sun, 30 Jul 2000 08:42:13 +0000 Subject: [PATCH] added null pointer check in DoGetSize functions; else programs crash when resizing list heads git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/motif/window.cpp b/src/motif/window.cpp index dd24fa4ac9..9b1c84db66 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -1199,7 +1199,7 @@ void wxWindow::DoGetSize(int *x, int *y) const Widget widget = (Widget) GetTopWidget(); Dimension xx, yy; XtVaGetValues(widget, XmNwidth, &xx, XmNheight, &yy, NULL); - *x = xx; *y = yy; + if(x) *x = xx; if(y) *y = yy; } void wxWindow::DoGetPosition(int *x, int *y) const @@ -1222,7 +1222,7 @@ void wxWindow::DoGetPosition(int *x, int *y) const yy -= pt.y; } - *x = xx; *y = yy; + if(x) *x = xx; if(y) *y = yy; } void wxWindow::DoScreenToClient(int *x, int *y) const @@ -1258,7 +1258,7 @@ void wxWindow::DoGetClientSize(int *x, int *y) const Widget widget = (Widget) GetClientWidget(); Dimension xx, yy; XtVaGetValues(widget, XmNwidth, &xx, XmNheight, &yy, NULL); - *x = xx; *y = yy; + if(x) *x = xx; if(y) *y = yy; } void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags) -- 2.50.0