summaryrefslogtreecommitdiffstats
path: root/src/sp-use.cpp
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2014-03-17 14:05:12 +0000
committerJazzyNico <nicoduf@yahoo.fr>2014-03-17 14:05:12 +0000
commit177d4b53062fa9093c2e37d15fe4c101fef7e17d (patch)
tree6b35239da48f5bc5afc9aeee0d290a3f13989a4b /src/sp-use.cpp
parentFix header and copyright licence (diff)
downloadinkscape-177d4b53062fa9093c2e37d15fe4c101fef7e17d.tar.gz
inkscape-177d4b53062fa9093c2e37d15fe4c101fef7e17d.zip
Fix for Bug #1293073 (Dragging a symbol crashes the application when the symbol has no title).
Fixed bugs: - https://launchpad.net/bugs/1293073 (bzr r13159)
Diffstat (limited to 'src/sp-use.cpp')
-rw-r--r--src/sp-use.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sp-use.cpp b/src/sp-use.cpp
index 14f51159b..e8fe3687f 100644
--- a/src/sp-use.cpp
+++ b/src/sp-use.cpp
@@ -220,7 +220,11 @@ const char* SPUse::displayName() const {
gchar* SPUse::description() const {
if (this->child) {
if( SP_IS_SYMBOL( this->child ) ) {
- return g_strdup_printf(_("called %s"), Glib::Markup::escape_text(Glib::ustring( g_dpgettext2(NULL, "Symbol", this->child->title()))).c_str());
+ if (this->child->title()) {
+ return g_strdup_printf(_("called %s"), Glib::Markup::escape_text(Glib::ustring( g_dpgettext2(NULL, "Symbol", this->child->title()))).c_str());
+ } else {
+ return g_strdup_printf(_("called %s"), _("Unnamed Symbol"));
+ }
}
static unsigned recursion_depth = 0;