From d9468a20c4098a9c8719d67143ce38724a242eb9 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 21 Aug 2008 12:21:14 +0000 Subject: [PATCH] #9876 (GC: added sanity check to wxGraphicsPathData::AddEllipse()) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/graphcmn.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index 49a2a87967..e35981ca6f 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -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; -- 2.47.2