diff --git a/0001-win32-Fix-image-surface-freeing-loop.patch b/0001-win32-Fix-image-surface-freeing-loop.patch new file mode 100644 index 0000000..336125c --- /dev/null +++ b/0001-win32-Fix-image-surface-freeing-loop.patch @@ -0,0 +1,31 @@ +From 9fcd092ce1d59a19a74f48cdbdfbe71bd5f18f9e Mon Sep 17 00:00:00 2001 +From: Michael Henning +Date: Sun, 21 Jul 2013 22:55:57 -0400 +Subject: [PATCH] win32: Fix image surface freeing loop + +Previously, _cairo_win32_display_surface_finish could attempt to destroy +its patrent while the parent was in the process of being destroyed. +This simply checks to see if the parent's refcount is zero before freeing it. + +https://bugs.freedesktop.org/show_bug.cgi?id=63787 +--- + src/win32/cairo-win32-display-surface.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c +index 0390625..f4d27bb 100644 +--- a/src/win32/cairo-win32-display-surface.c ++++ b/src/win32/cairo-win32-display-surface.c +@@ -415,7 +415,8 @@ _cairo_win32_display_surface_finish (void *abstract_surface) + { + cairo_win32_display_surface_t *surface = abstract_surface; + +- if (surface->image) { ++ if (surface->image && ++ CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->image->ref_count)) { + /* Unhook ourselves first to avoid the double-unref from the image */ + to_image_surface(surface->image)->parent = NULL; + cairo_surface_finish (surface->image); +-- +1.8.3.3 + diff --git a/mingw-cairo.spec b/mingw-cairo.spec index 68e2f5d..9a89de6 100644 --- a/mingw-cairo.spec +++ b/mingw-cairo.spec @@ -2,7 +2,7 @@ Name: mingw-cairo Version: 1.12.14 -Release: 4%{?dist} +Release: 5%{?dist} Summary: MinGW Windows Cairo library License: LGPLv2 or MPLv1.1 @@ -45,6 +45,8 @@ Patch1: 0001-win32-Free-the-fallback-upon-finish.patch Patch2: 0002-win32-fix-corrupted-drawing.patch # https://bugs.freedesktop.org/show_bug.cgi?id=63043 Patch3: 0003-build-sys-do-not-try-to-build-util-sphinx-on-Windows.patch +# https://bugs.freedesktop.org/show_bug.cgi?id=63787 +Patch4: 0001-win32-Fix-image-surface-freeing-loop.patch %description MinGW Windows Cairo library. @@ -96,6 +98,7 @@ Static version of the MinGW Windows Cairo library. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 autoreconf -vfi @@ -220,6 +223,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Sun Aug 4 2013 Erik van Pienbroek - 1.12.14-5 +- Fix assertion failure when using the latest gtk3 (RHBZ #991829, FD BZ #63787) + * Sat Aug 03 2013 Fedora Release Engineering - 1.12.14-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild