]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't choke on NULL pointer passed into wxSlider::GetSize.
authorStefan Neis <Stefan.Neis@t-online.de>
Sun, 2 May 2004 17:05:55 +0000 (17:05 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sun, 2 May 2004 17:05:55 +0000 (17:05 +0000)
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

index ef06f20c8a4255960869ea0579ae66d5b3aa434a..14ba806ec589e42f3dfe3a592ac0b020476d7e46 100644 (file)
@@ -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