diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-09-23 17:24:25 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-09-23 17:24:25 +0000 |
| commit | ac16411f213f98407fc42c1d04eb4ae6c187e4a6 (patch) | |
| tree | b8fd94caee6b202043810a7366ab3f032882a48f /src/ui/dialog/document-properties.cpp | |
| parent | add newly linked-in m4 files to .bzrignore (diff) | |
| parent | Fix for 170395 : Add Trace Bitmap to context menu of images : Focus fix (diff) | |
| download | inkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.tar.gz inkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.zip | |
merge from trunk (r11698)
(bzr r11668.1.10)
Diffstat (limited to 'src/ui/dialog/document-properties.cpp')
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index c7be0877d..7bd1b81c0 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -959,16 +959,18 @@ void DocumentProperties::removeEmbeddedScript(){ const GSList *current = SP_ACTIVE_DOCUMENT->getResourceList( "script" ); while ( current ) { - SPObject* obj = SP_OBJECT(current->data); - if (id == obj->getId()){ + if (current->data && SP_IS_OBJECT(current->data)) { + SPObject* obj = SP_OBJECT(current->data); + if (id == obj->getId()){ - //XML Tree being used directly here while it shouldn't be. - Inkscape::XML::Node *repr = obj->getRepr(); - if (repr){ - sp_repr_unparent(repr); + //XML Tree being used directly here while it shouldn't be. + Inkscape::XML::Node *repr = obj->getRepr(); + if (repr){ + sp_repr_unparent(repr); - // inform the document, so we can undo - DocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_REMOVE_EMBEDDED_SCRIPT, _("Remove embedded script")); + // inform the document, so we can undo + DocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_REMOVE_EMBEDDED_SCRIPT, _("Remove embedded script")); + } } } current = g_slist_next(current); |
