summaryrefslogtreecommitdiffstats
path: root/src/style-internal.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2014-07-10 19:22:59 +0000
committerDiederik van Lierop <mail@diedenrezi.nl>2014-07-10 19:22:59 +0000
commit977a312f0979f34215f3c0ba5332d85b257d271c (patch)
tree6d0723c0903ebe5b60bfbea926d69138b2e10eab /src/style-internal.cpp
parentrefresh SPCurve in a cloned clip (Bug 1322940) (diff)
downloadinkscape-977a312f0979f34215f3c0ba5332d85b257d271c.tar.gz
inkscape-977a312f0979f34215f3c0ba5332d85b257d271c.zip
Fix crash when ungrouping a group that has a filter applied to it
Fixed bugs: - https://launchpad.net/bugs/1323849 (bzr r13449)
Diffstat (limited to 'src/style-internal.cpp')
-rw-r--r--src/style-internal.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/style-internal.cpp b/src/style-internal.cpp
index c686a1807..d0e65a19a 100644
--- a/src/style-internal.cpp
+++ b/src/style-internal.cpp
@@ -1440,7 +1440,7 @@ SPIFilter::cascade( const SPIBase* const parent ) {
void
SPIFilter::merge( const SPIBase* const parent ) {
if( const SPIFilter* p = dynamic_cast<const SPIFilter*>(parent) ) {
- // The "correct" thing to due is to combine the filter primitives.
+ // The "correct" thing to do is to combine the filter primitives.
// The next best thing is to keep any filter on this object. If there
// is no filter on this object, then use any filter on the parent.
if( (!set || inherit) && p->href && p->href->getObject() ) { // is the getObject() needed?
@@ -1453,9 +1453,11 @@ SPIFilter::merge( const SPIBase* const parent ) {
}
} else {
// If we don't have an href, create it
- if( &style->document ) { // FIXME
+ if( style->document ) { // FIXME
href = new SPFilterReference(style->document);
//href->changedSignal().connect(sigc::bind(sigc::ptr_fun(sp_style_filter_ref_changed), style));
+ } else if (style->object) {
+ href = new SPFilterReference(style->object);
}
}
if( href ) {