]> git.saurik.com Git - wxWidgets.git/commitdiff
#9876 (GC: added sanity check to wxGraphicsPathData::AddEllipse())
authorRobert Roebling <robert@roebling.de>
Thu, 21 Aug 2008 12:21:14 +0000 (12:21 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 21 Aug 2008 12:21:14 +0000 (12:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/graphcmn.cpp

index 49a2a879676dfc4880d8419a89a1ef59feba48f6..e35981ca6f7146cc5b07130bc4f114d010967edc 100644 (file)
@@ -425,6 +425,9 @@ void wxGraphicsPathData::AddCircle( wxDouble x, wxDouble y, wxDouble r )
 
 void wxGraphicsPathData::AddEllipse( wxDouble x, wxDouble y, wxDouble w, wxDouble h)
 {
+    if (w <= 0. || h <= 0.)
+      return;
+      
     wxDouble rw = w/2;
     wxDouble rh = h/2;
     wxDouble xc = x + rw;