summaryrefslogtreecommitdiffstats
path: root/src/sp-tref.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-03-04 22:53:40 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-03-04 22:53:40 +0000
commit6ae9e1cf243792ee2c72cd4e46ad524b9d0e05ea (patch)
tree4d6e2031e17b2b0c4cbbf311b1737931ce54745a /src/sp-tref.cpp
parentremove duplicate "+version" in the version name (diff)
downloadinkscape-6ae9e1cf243792ee2c72cd4e46ad524b9d0e05ea.tar.gz
inkscape-6ae9e1cf243792ee2c72cd4e46ad524b9d0e05ea.zip
Apply Gail's patch which fixes LP #178646
(bzr r4964)
Diffstat (limited to 'src/sp-tref.cpp')
-rw-r--r--src/sp-tref.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index b3d5c5ffe..1f1cb4351 100644
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
@@ -353,10 +353,22 @@ static gchar *
sp_tref_description(SPItem *item)
{
SPTRef *tref = SP_TREF(item);
-
+
+ SPObject *referred = tref->getObjectReferredTo();
+
if (tref && tref->getObjectReferredTo()) {
- char *child_desc = sp_item_description(SP_ITEM(tref->getObjectReferredTo()));
- char *ret = g_strdup_printf(_("<b>Cloned character data</b> from: %s"), child_desc);
+ char *child_desc;
+
+ if (SP_IS_ITEM(referred)) {
+ child_desc = sp_item_description(SP_ITEM(referred));
+ } else {
+ child_desc = "";
+ }
+
+ char *ret = g_strdup_printf(
+ _("<b>Cloned character data</b>%s%s"),
+ (SP_IS_ITEM(referred) ? _(" from ") : ""),
+ child_desc);
g_free(child_desc);
return ret;
} else {