diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-01-30 11:17:38 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-01-30 11:17:38 +0000 |
| commit | d0018475cc1e848963dc6eb9a261cfb18e05b7d9 (patch) | |
| tree | 7d054a267c7cda00b2825832ccb46c9240d9c416 /src/ui | |
| parent | update to trunk (diff) | |
| parent | Prevent crash if a symbols file does not have a title. (diff) | |
| download | inkscape-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.cpp | 10 |
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); } |
