summaryrefslogtreecommitdiffstats
path: root/src/widgets/font-selector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/font-selector.cpp')
-rw-r--r--src/widgets/font-selector.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp
index ec619c50c..51f706d4b 100644
--- a/src/widgets/font-selector.cpp
+++ b/src/widgets/font-selector.cpp
@@ -383,13 +383,18 @@ GtkWidget *sp_font_selector_new()
void sp_font_selector_set_font (SPFontSelector *fsel, font_instance *font, double size)
{
-
if (font && (fsel->font != font || size != fsel->fontsize))
{
gchar family[256];
font->Family (family, 256);
+
+ Gtk::TreePath path;
- Gtk::TreePath path = Inkscape::FontLister::get_instance()->get_row_for_font (family);
+ try {
+ path = Inkscape::FontLister::get_instance()->get_row_for_font (family);
+ } catch (...) {
+ return;
+ }
fsel->block_emit = TRUE;
gtk_tree_selection_select_path (gtk_tree_view_get_selection (GTK_TREE_VIEW (fsel->family_treeview)), path.gobj());