From: joncruz Date: Fri, 9 Jun 2006 07:53:12 +0000 (+0000) Subject: Handle case of function call faling. Fixes bug 1501150. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=720176fd3ff8fb593cb312de99016c1c27f5883c;p=inkscape.git Handle case of function call faling. Fixes bug 1501150. --- diff --git a/ChangeLog b/ChangeLog index 55f30adf2..213c912bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-06-09 Jon A. Cruz + + * src/widgets/toolbox.cpp: + + Handle case when function call fails. + Fixes bug #1501150. + 2006-06-07 Jon A. Cruz * src/seltrans.cpp: diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index cb9557677..ab480ebec 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2965,16 +2965,19 @@ sp_text_toolbox_family_changed (GtkTreeSelection *selection, GObject *tbl) { SPDesktop *desktop = SP_ACTIVE_DESKTOP; - GtkTreeModel *model; + GtkTreeModel *model = 0; GtkWidget *popdown = GTK_WIDGET (g_object_get_data (tbl, "family-popdown-window")); GtkWidget *entry = GTK_WIDGET (g_object_get_data (tbl, "family-entry")); GtkTreeIter iter; - char *family; + char *family = 0; gdk_pointer_ungrab (GDK_CURRENT_TIME); gdk_keyboard_ungrab (GDK_CURRENT_TIME); - gtk_tree_selection_get_selected (selection, &model, &iter); + if ( !gtk_tree_selection_get_selected( selection, &model, &iter ) ) { + return; + } + gtk_tree_model_get (model, &iter, 0, &family, -1); if (g_object_get_data (G_OBJECT (selection), "block"))