just return if there's no text in the entry (fixes #8200, from Soren

2002-05-20  jacob berkman  <jacob@ximian.com>

	* gnome-default-applications-properties.c (text_apply_editor):
	just return if there's no text in the entry (fixes #8200, from Soren Sandmann
	<sandmann@daimi.au.dk>)
This commit is contained in:
jacob berkman 2002-05-20 20:21:34 +00:00 committed by Jacob Berkman
parent cda5e4344a
commit 7190a21a29
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2002-05-20 jacob berkman <jacob@ximian.com>
* gnome-default-applications-properties.c (text_apply_editor):
just return if there's no text in the entry (fixes #8200, from Soren Sandmann
<sandmann@daimi.au.dk>)
2002-05-16 jacob berkman <jacob@ximian.com> 2002-05-16 jacob berkman <jacob@ximian.com>
* gnome-default-applications-properties.glade: turn off help tab, * gnome-default-applications-properties.glade: turn off help tab,

View file

@ -268,6 +268,10 @@ text_apply_editor (GtkWidget *entry,
editor = gtk_entry_get_text (GTK_ENTRY (WID ("text_select_combo_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) { for (li = text_editors; li; li = li->next) {
mime_app = li->data; mime_app = li->data;
if (! strcmp (mime_app->name, editor)) { if (! strcmp (mime_app->name, editor)) {