diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-09-22 03:27:14 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-09-22 03:27:14 +0000 |
| commit | 7c0506c103c881790a2e347e2a68aecdf8935d5c (patch) | |
| tree | 46a54b7626bbf984e2f18cbcf364d180a8c5c6d0 /src/ui/dialog/document-properties.cpp | |
| parent | Fix for 1014988 : Add gimp spin scale widget (diff) | |
| download | inkscape-7c0506c103c881790a2e347e2a68aecdf8935d5c.tar.gz inkscape-7c0506c103c881790a2e347e2a68aecdf8935d5c.zip | |
Fix for 1014988 : Converts slide widgets to new spin-scale widget
(bzr r11691)
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); |
