From 21abf74176d6a2db53a274f13421b84ee17714e7 Mon Sep 17 00:00:00 2001 From: Jabiertxo Arraiza Cenoz Date: Fri, 4 May 2018 16:37:02 +0200 Subject: Allow link a SVG as image --- src/object/sp-lpe-item.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/object') 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 clip_path_list = clip_path->childList(true); for ( std::vector::const_iterator iter=clip_path_list.begin();iter!=clip_path_list.end();++iter) { SPLPEItem* clip_data = dynamic_cast(*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 mask_path_list = mask_path->childList(true); for ( std::vector::const_iterator iter = mask_path_list.begin(); iter != mask_path_list.end();++iter) { SPLPEItem* mask_data = dynamic_cast(*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 item_list = sp_item_group_item_list(SP_GROUP(lpeitem)); for ( std::vector::const_iterator iter=item_list.begin();iter!=item_list.end();++iter) { SPLPEItem* subitem = dynamic_cast(*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(); -- cgit v1.2.3