diff options
| author | Adonis Papaderos <ado.papas@yahoo.gr> | 2010-12-06 22:01:37 +0000 |
|---|---|---|
| committer | Adonis Papaderos <ado.papas@yahoo.gr> | 2010-12-06 22:01:37 +0000 |
| commit | 04f322e25ab5722aa8a2dc8fb001aad32c526891 (patch) | |
| tree | 71107c151313496bf582fcadffda3358acdeedff /src/selection-chemistry.cpp | |
| parent | Make linked offsets respect "Relink duplicated clones" settings (diff) | |
| download | inkscape-04f322e25ab5722aa8a2dc8fb001aad32c526891.tar.gz inkscape-04f322e25ab5722aa8a2dc8fb001aad32c526891.zip | |
implemented proper error checking
(bzr r9941.1.2)
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rw-r--r-- | src/selection-chemistry.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 55cfe9234..8b917de55 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -417,7 +417,8 @@ void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone) } } else if (SP_IS_OFFSET(old_clone)) { for (guint j = 0; j < old_ids.size(); j++) { - if (!strcmp(SP_OFFSET(old_clone)->sourceHref+1, old_ids[j])) { + gchar *source_href = SP_OFFSET(old_clone)->sourceHref; + if (source_href && source_href[0]=='#' && !strcmp(source_href+1, old_ids[j])) { gchar *newref = g_strdup_printf("#%s", new_ids[j]); doc->getObjectById(new_ids[i])->repr->setAttribute("xlink:href", newref); g_free(newref); |
