diff options
| author | Jabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es> | 2018-05-04 14:37:02 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es> | 2018-05-10 16:46:08 +0000 |
| commit | 21abf74176d6a2db53a274f13421b84ee17714e7 (patch) | |
| tree | 591bfa96068a2c6b5b02224f49023d6ce3a5b3f4 /src/object | |
| parent | Improve sort handling in XML (diff) | |
| download | inkscape-21abf74176d6a2db53a274f13421b84ee17714e7.tar.gz inkscape-21abf74176d6a2db53a274f13421b84ee17714e7.zip | |
Allow link a SVG as image
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/sp-lpe-item.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/object/sp-lpe-item.cpp b/src/object/sp-lpe-item.cpp index c7c925c55..98c99e3ae 100644 --- a/src/object/sp-lpe-item.cpp +++ b/src/object/sp-lpe-item.cpp @@ -391,7 +391,9 @@ sp_lpe_item_cleanup_original_path_recursive(SPLPEItem *lpeitem, bool keep_paths, std::vector<SPObject*> clip_path_list = clip_path->childList(true); for ( std::vector<SPObject*>::const_iterator iter=clip_path_list.begin();iter!=clip_path_list.end();++iter) { SPLPEItem* clip_data = dynamic_cast<SPLPEItem*>(*iter); - sp_lpe_item_cleanup_original_path_recursive(clip_data, keep_paths, lpeitem && !lpeitem->hasPathEffectRecursive(), true); + if (clip_data) { + sp_lpe_item_cleanup_original_path_recursive(clip_data, keep_paths, lpeitem && !lpeitem->hasPathEffectRecursive(), true); + } } } @@ -400,7 +402,9 @@ sp_lpe_item_cleanup_original_path_recursive(SPLPEItem *lpeitem, bool keep_paths, std::vector<SPObject*> mask_path_list = mask_path->childList(true); for ( std::vector<SPObject*>::const_iterator iter = mask_path_list.begin(); iter != mask_path_list.end();++iter) { SPLPEItem* mask_data = dynamic_cast<SPLPEItem*>(*iter); - sp_lpe_item_cleanup_original_path_recursive(mask_data, keep_paths, lpeitem && !lpeitem->hasPathEffectRecursive(), true); + if (mask_data) { + sp_lpe_item_cleanup_original_path_recursive(mask_data, keep_paths, lpeitem && !lpeitem->hasPathEffectRecursive(), true); + } } } @@ -408,8 +412,9 @@ sp_lpe_item_cleanup_original_path_recursive(SPLPEItem *lpeitem, bool keep_paths, std::vector<SPItem*> item_list = sp_item_group_item_list(SP_GROUP(lpeitem)); for ( std::vector<SPItem*>::const_iterator iter=item_list.begin();iter!=item_list.end();++iter) { SPLPEItem* subitem = dynamic_cast<SPLPEItem*>(*iter); - sp_lpe_item_cleanup_original_path_recursive(subitem, keep_paths); - + if (subitem) { + sp_lpe_item_cleanup_original_path_recursive(subitem, keep_paths); + } } } else if (path) { Inkscape::XML::Node *repr = lpeitem->getRepr(); |
