From: JazzyNico Date: Wed, 29 Jul 2009 19:46:17 +0000 (+0000) Subject: Fix for bug LP #383244 (patch by Hannes Hochreiner) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8e8087c390e859ae92504ec8f5a468bbd89ace53;p=inkscape.git Fix for bug LP #383244 (patch by Hannes Hochreiner) --- diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index bb9ab4d02..423778276 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -653,7 +653,7 @@ void DocumentProperties::removeExternalScript(){ while ( current ) { SPObject* obj = SP_OBJECT(current->data); SPScript* script = (SPScript*) obj; - if (!name.compare(script->xlinkhref)){ + if (name == script->xlinkhref){ sp_repr_unparent(obj->repr); sp_document_done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_REMOVE_EXTERNAL_SCRIPT, _("Remove external script")); } @@ -671,8 +671,12 @@ void DocumentProperties::populate_external_scripts_box(){ while ( current ) { SPObject* obj = SP_OBJECT(current->data); SPScript* script = (SPScript*) obj; - Gtk::TreeModel::Row row = *(_ExternalScriptsListStore->append()); - row[_ExternalScriptsListColumns.filenameColumn] = script->xlinkhref; + if (script->xlinkhref) + { + Gtk::TreeModel::Row row = *(_ExternalScriptsListStore->append()); + row[_ExternalScriptsListColumns.filenameColumn] = script->xlinkhref; + } + current = g_slist_next(current); } }