a2cf677
From 148971013ee48926dfe153ca39c94be92acde37c Mon Sep 17 00:00:00 2001
a2cf677
From: Paul Cornett <paulcor@bullseye.com>
a2cf677
Date: Wed, 15 Oct 2014 16:53:54 +0000
a2cf677
Subject: [PATCH] fix crash in wxGCDC::DrawEllipticArc() after r76954, closes
a2cf677
 #16623
a2cf677
a2cf677
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
a2cf677
---
a2cf677
 src/common/dcgraph.cpp | 4 +---
a2cf677
 1 file changed, 1 insertion(+), 3 deletions(-)
a2cf677
a2cf677
diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp
a2cf677
index d27e9cc..c390eb4 100644
a2cf677
--- a/src/common/dcgraph.cpp
a2cf677
+++ b/src/common/dcgraph.cpp
a2cf677
@@ -646,13 +646,12 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
a2cf677
     m_graphicContext->PushState();
a2cf677
     m_graphicContext->Translate(dx, dy);
a2cf677
     m_graphicContext->Scale(factor, 1.0);
a2cf677
-    wxGraphicsPath path;
a2cf677
+    wxGraphicsPath path = m_graphicContext->CreatePath();
a2cf677
 
a2cf677
     // since these angles (ea,sa) are measured counter-clockwise, we invert them to
a2cf677
     // get clockwise angles
a2cf677
     if ( m_brush.GetStyle() != wxTRANSPARENT )
a2cf677
     {
a2cf677
-        path = m_graphicContext->CreatePath();
a2cf677
         path.MoveToPoint( 0, 0 );
a2cf677
         path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
a2cf677
         path.AddLineToPoint( 0, 0 );
a2cf677
@@ -664,7 +663,6 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
a2cf677
     }
a2cf677
     else
a2cf677
     {
a2cf677
-        wxGraphicsPath path = m_graphicContext->CreatePath();
a2cf677
         path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea );
a2cf677
         m_graphicContext->DrawPath( path );
a2cf677
     }