From 73474afd20845fa3afba6b5e7a1fbf3508f47c2e Mon Sep 17 00:00:00 2001 From: bryce Date: Wed, 10 Jan 2007 08:56:04 +0000 Subject: [PATCH] Only evaluate stock markers if the inkscape:stockid tag is actually defined. Fixes bug 1631906. --- src/dialogs/stroke-style.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/dialogs/stroke-style.cpp b/src/dialogs/stroke-style.cpp index ebfb7aca6..3db6c62ee 100644 --- a/src/dialogs/stroke-style.cpp +++ b/src/dialogs/stroke-style.cpp @@ -756,11 +756,13 @@ sp_marker_list_from_doc (GtkWidget *m, SPDocument *current_doc, SPDocument *sour Inkscape::XML::Node *repr = SP_OBJECT_REPR((SPItem *) ml->data); bool stock_dupe = false; - GSList * markers_doc_ml = ink_marker_list_get(markers_doc); - for (; markers_doc_ml != NULL; markers_doc_ml = markers_doc_ml->next) { - const gchar* stockid = SP_OBJECT_REPR(markers_doc_ml->data)->attribute("inkscape:stockid"); - if (stockid && !strcmp(repr->attribute("inkscape:stockid"), stockid)) - stock_dupe = true; + if (repr->attribute("inkscape:stockid")) { + GSList * markers_doc_ml = ink_marker_list_get(markers_doc); + for (; markers_doc_ml != NULL; markers_doc_ml = markers_doc_ml->next) { + const gchar* stockid = SP_OBJECT_REPR(markers_doc_ml->data)->attribute("inkscape:stockid"); + if (stockid && !strcmp(repr->attribute("inkscape:stockid"), stockid)) + stock_dupe = true; + } } if (stock_dupe) // stock item, dont add to list from current doc -- 2.30.2