summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-01-30 11:17:38 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-01-30 11:17:38 +0000
commitd0018475cc1e848963dc6eb9a261cfb18e05b7d9 (patch)
tree7d054a267c7cda00b2825832ccb46c9240d9c416 /src/ui
parentupdate to trunk (diff)
parentPrevent crash if a symbols file does not have a title. (diff)
downloadinkscape-d0018475cc1e848963dc6eb9a261cfb18e05b7d9.tar.gz
inkscape-d0018475cc1e848963dc6eb9a261cfb18e05b7d9.zip
update to trunk
(bzr r11950.1.238)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/symbols.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ui/dialog/symbols.cpp b/src/ui/dialog/symbols.cpp
index c33920117..7079ca001 100644
--- a/src/ui/dialog/symbols.cpp
+++ b/src/ui/dialog/symbols.cpp
@@ -562,10 +562,18 @@ void SymbolsDialog::get_symbols() {
symbol_doc = SPDocument::createNewDoc( fullname, FALSE );
if( symbol_doc ) {
- const gchar *title = g_dpgettext2(NULL, "Symbol", symbol_doc->getRoot()->title());
+
+ const gchar *title = symbol_doc->getRoot()->title();
+
+ // A user provided file may not have a title
+ if( title != NULL ) {
+ title = g_dpgettext2(NULL, "Symbol", title); // Translate
+ }
+
if( title == NULL ) {
title = _("Unnamed Symbols");
}
+
symbolSets[Glib::ustring(title)] = symbol_doc;
symbolSet->append(title);
}