diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-04-04 18:35:16 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-04-04 18:35:16 +0000 |
| commit | dfc3d059f6a909f0a564665e6403552ba7209cd6 (patch) | |
| tree | b584202d0b49f6767b823d2fdfcf20e12ab0f462 /src/filter-chemistry.cpp | |
| parent | fix crash. Iterating through a list to find an object is not necessary, SPDoc... (diff) | |
| download | inkscape-dfc3d059f6a909f0a564665e6403552ba7209cd6.tar.gz inkscape-dfc3d059f6a909f0a564665e6403552ba7209cd6.zip | |
fix crash. If there are more crashes/issues related to references to undefined filters we should fix this in a more general way (e.g. not setting filter.set if invalid href)
Note that the file is still in a weird state, the stylesheet is not altered...
Fixed bugs:
- https://launchpad.net/bugs/1301076
(bzr r13266)
Diffstat (limited to 'src/filter-chemistry.cpp')
| -rw-r--r-- | src/filter-chemistry.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp index 0f9138560..151480177 100644 --- a/src/filter-chemistry.cpp +++ b/src/filter-chemistry.cpp @@ -378,6 +378,11 @@ SPFilter *modify_filter_gaussian_blur_from_item(SPDocument *document, SPItem *it } SPFilter *filter = SP_FILTER(item->style->getFilter()); + if (!filter) { + // We reach here when filter.set is true, but the href is not found in the document + return new_filter_simple_from_item(document, item, "normal", radius); + } + Inkscape::XML::Document *xml_doc = document->getReprDoc(); // If there are more users for this filter, duplicate it |
