From 7190a21a297f4b5eea633825cb1169efb3b090df Mon Sep 17 00:00:00 2001 From: jacob berkman Date: Mon, 20 May 2002 20:21:34 +0000 Subject: [PATCH] just return if there's no text in the entry (fixes #8200, from Soren 2002-05-20 jacob berkman * gnome-default-applications-properties.c (text_apply_editor): just return if there's no text in the entry (fixes #8200, from Soren Sandmann ) --- capplets/default-applications/ChangeLog | 6 ++++++ .../gnome-default-applications-properties.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/capplets/default-applications/ChangeLog b/capplets/default-applications/ChangeLog index c7192e919..c93e8fb13 100644 --- a/capplets/default-applications/ChangeLog +++ b/capplets/default-applications/ChangeLog @@ -1,3 +1,9 @@ +2002-05-20 jacob berkman + + * gnome-default-applications-properties.c (text_apply_editor): + just return if there's no text in the entry (fixes #8200, from Soren Sandmann + ) + 2002-05-16 jacob berkman * gnome-default-applications-properties.glade: turn off help tab, diff --git a/capplets/default-applications/gnome-default-applications-properties.c b/capplets/default-applications/gnome-default-applications-properties.c index eefba0263..6a502b37b 100644 --- a/capplets/default-applications/gnome-default-applications-properties.c +++ b/capplets/default-applications/gnome-default-applications-properties.c @@ -268,6 +268,10 @@ text_apply_editor (GtkWidget *entry, editor = gtk_entry_get_text (GTK_ENTRY (WID ("text_select_combo_entry"))); + /* don't do anything if it was cleared. */ + if (!*editor) + return; + for (li = text_editors; li; li = li->next) { mime_app = li->data; if (! strcmp (mime_app->name, editor)) {