diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/style-internal.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/style-internal.cpp b/src/style-internal.cpp index f8a4a43f7..a81a2799d 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -1405,11 +1405,20 @@ SPIFilter::read( gchar const *str ) { set = true; // Create href if not already done. - if (!href && style->object) { - href = new SPFilterReference(style->object); - href->changedSignal().connect(sigc::bind(sigc::ptr_fun(sp_style_filter_ref_changed), style)); + if (!href) { + if (style->object) { + href = new SPFilterReference(style->object); + } + // Do we have href now? + if ( href ) { + href->changedSignal().connect(sigc::bind(sigc::ptr_fun(sp_style_filter_ref_changed), style)); + } else { + std::cerr << "SPIFilter::read(): Could not allocate 'href'" << std::endl; + return; + } } + // We have href try { href->attach(Inkscape::URI(uri)); } catch (Inkscape::BadURIException &e) { |
