From a00ffdf1c6f5f80d1220d141ba16abb0b635d094 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Sun, 2 May 2004 17:05:55 +0000 Subject: [PATCH] Don't choke on NULL pointer passed into wxSlider::GetSize. Take the inverted coordinate system into account when computing size. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/os2/radiobox.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/os2/radiobox.cpp b/src/os2/radiobox.cpp index ef06f20c8a..14ba806ec5 100644 --- a/src/os2/radiobox.cpp +++ b/src/os2/radiobox.cpp @@ -868,8 +868,10 @@ void wxRadioBox::GetSize( ,&vRect ); - *pnWidth = vRect.xRight - vRect.xLeft; - *pnHeight = vRect.yBottom - vRect.yTop; + if (pnWidth) + *pnWidth = vRect.xRight - vRect.xLeft; + if (pnHeight) + *pnHeight = vRect.yTop - vRect.yBottom; } // end of wxRadioBox::GetSize // Find string for position -- 2.45.2