diff --git a/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch b/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch new file mode 100644 index 0000000..29a993e --- /dev/null +++ b/wxGTK3-3.0.2-draw-elliptic-arc-crash.patch @@ -0,0 +1,38 @@ +From 148971013ee48926dfe153ca39c94be92acde37c Mon Sep 17 00:00:00 2001 +From: Paul Cornett +Date: Wed, 15 Oct 2014 16:53:54 +0000 +Subject: [PATCH] fix crash in wxGCDC::DrawEllipticArc() after r76954, closes + #16623 + +git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 +--- + src/common/dcgraph.cpp | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp +index d27e9cc..c390eb4 100644 +--- a/src/common/dcgraph.cpp ++++ b/src/common/dcgraph.cpp +@@ -646,13 +646,12 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, + m_graphicContext->PushState(); + m_graphicContext->Translate(dx, dy); + m_graphicContext->Scale(factor, 1.0); +- wxGraphicsPath path; ++ wxGraphicsPath path = m_graphicContext->CreatePath(); + + // since these angles (ea,sa) are measured counter-clockwise, we invert them to + // get clockwise angles + if ( m_brush.GetStyle() != wxTRANSPARENT ) + { +- path = m_graphicContext->CreatePath(); + path.MoveToPoint( 0, 0 ); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); + path.AddLineToPoint( 0, 0 ); +@@ -664,7 +663,6 @@ void wxGCDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, + } + else + { +- wxGraphicsPath path = m_graphicContext->CreatePath(); + path.AddArc( 0, 0, h/2.0 , DegToRad(-sa) , DegToRad(-ea), sa > ea ); + m_graphicContext->DrawPath( path ); + } diff --git a/wxGTK3.spec b/wxGTK3.spec index 87606a2..ada9880 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 23%{?dist} +Release: 24%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -81,6 +81,10 @@ Patch13: %{name}-%{version}-init-from-font.patch Patch14: %{name}-%{version}-gtk-show-uri.patch Patch15: %{name}-%{version}-gtk-show-uri1.patch Patch16: %{name}-%{version}-wxgetkeystate.patch +# Fixes crash in wxGCDC::DrawEllipticArc() +# For more details, see the upstream commit: +# https://github.com/wxWidgets/wxWidgets/commit/148971013ee48926dfe153ca39c94be92acde37c +Patch17: %{name}-%{version}-draw-elliptic-arc-crash.patch BuildRequires: gtk%{gtkver}-devel #Note webkitgtk (GTK2) does not appear to be supported @@ -213,6 +217,7 @@ This package provides XML documentation for the %{srcname} library. %patch14 -p1 -b .gtk-show-uri %patch15 -p1 -b .gtk-show-uri1 %patch16 -p1 -b .wxgetkeystate +%patch17 -p1 -b .draw-elliptic-arc-crash # patch some installed files to avoid conflicts with 2.8.* sed -i -e 's|aclocal)|aclocal/wxwin3.m4)|' Makefile.in @@ -369,6 +374,9 @@ fi %doc docs/doxygen/out/xml/* %changelog +* Sat Sep 24 2016 Scott Talbert - 3.0.2-24 +- Add patch to fix crash in wxGCDC::DrawEllipticArc() + * Mon Sep 19 2016 Scott Talbert - 3.0.2-23 - Fix alternatives implementation