From 2115fb7086af14160a0a0cc30534d23eea7fd801 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Mon, 11 Nov 2013 17:24:12 +0100 Subject: Fix for Bug #1249390 (filter with feImage with empty href crashes inkscape). Fixed bugs: - https://launchpad.net/bugs/1249390 (bzr r12790) --- src/display/nr-filter-image.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp index 4ca4cd07c..92bb9dcaa 100644 --- a/src/display/nr-filter-image.cpp +++ b/src/display/nr-filter-image.cpp @@ -163,6 +163,10 @@ void FilterImage::render_cairo(FilterSlot &slot) broken_ref = false; } + if (broken_ref) { + return; + } + cairo_surface_t *image_surface = image->getSurfaceRaw(); Geom::Rect sa = slot.get_slot_area(); -- cgit v1.2.3 From f8a064e45c3d5571d27bbda9ffcfeacd22398b49 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Tue, 12 Nov 2013 01:51:18 +0100 Subject: Fix bug in SPSwitch. Fixed bugs: - https://launchpad.net/bugs/1249862 (bzr r12794) --- src/sp-item-group.h | 2 +- src/sp-switch.cpp | 1 + src/sp-switch.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sp-item-group.h b/src/sp-item-group.h index deb80a641..2004a72b8 100644 --- a/src/sp-item-group.h +++ b/src/sp-item-group.h @@ -55,7 +55,7 @@ public: void scaleChildItemsRec(Geom::Scale const &sc, Geom::Point const &p); gint getItemCount() const; - void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags); + virtual void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags); private: void _updateLayerMode(unsigned int display_key=0); diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp index 5c88d7af8..b4841c0d0 100644 --- a/src/sp-switch.cpp +++ b/src/sp-switch.cpp @@ -40,6 +40,7 @@ SPSwitch::SPSwitch() : SPGroup() { } SPSwitch::~SPSwitch() { + _releaseLastItem(_cached_item); } SPObject *SPSwitch::_evaluateFirst() { diff --git a/src/sp-switch.h b/src/sp-switch.h index 3ccc9e3b7..c35982860 100644 --- a/src/sp-switch.h +++ b/src/sp-switch.h @@ -28,7 +28,7 @@ public: void resetChildEvaluated() { _reevaluate(); } GSList *_childList(bool add_ref, SPObject::Action action); - void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags); + virtual void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags); SPObject *_evaluateFirst(); void _reevaluate(bool add_to_arena = false); -- cgit v1.2.3