]> 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 16:48:22 +0000 (16:48 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sun, 2 May 2004 16:48:22 +0000 (16:48 +0000)
Take the inverted coordinate system into account when computing size.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/slider.cpp

index 7662c87bfbac6ba6ba034d712042d4b547ef9d7e..db9beff7687c86a2f2008a24229b635271c8d883 100644 (file)
@@ -862,8 +862,10 @@ void wxSlider::GetSize(
         wxFindMaxSize( m_hStaticValue
                       ,&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 wxSlider::GetSize
 
 int wxSlider::GetThumbLength() const