From 177d4b53062fa9093c2e37d15fe4c101fef7e17d Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Mon, 17 Mar 2014 15:05:12 +0100 Subject: 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) --- src/sp-use.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/sp-use.cpp') 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; -- cgit v1.2.3