From 8d21ca7065ab323a073e687aef2b52f0b6a73f54 Mon Sep 17 00:00:00 2001 From: mderezynski Date: Sat, 20 May 2006 15:00:06 +0000 Subject: [PATCH] * Set default font widget insensitive only if exists --- src/dialogs/text-edit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index 3d8776b61..97f872891 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -804,8 +804,9 @@ sp_text_edit_dialog_text_changed (GtkTextBuffer *tb, GtkWidget *dlg) void sp_text_edit_dialog_default_set_insensitive () { - GtkWidget *def = GTK_WIDGET (g_object_get_data (G_OBJECT (dlg), "default")); - gtk_widget_set_sensitive (def, FALSE); + gpointer data = g_object_get_data (G_OBJECT (dlg), "default"); + if (!data) return; + gtk_widget_set_sensitive (GTK_WIDGET (data), FALSE); } static void -- 2.30.2