From d9f9bda135c720cb0ff378a0337f8df402720bb0 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 18 Oct 2008 09:38:23 +0000 Subject: [PATCH] Ensure that unset string options do not crash when you try and set them svn path=/trunk/netsurf/; revision=5591 --- gtk/dialogs/gtk_options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/dialogs/gtk_options.c b/gtk/dialogs/gtk_options.c index 4b4ac986b..868a680b4 100644 --- a/gtk/dialogs/gtk_options.c +++ b/gtk/dialogs/gtk_options.c @@ -304,7 +304,7 @@ static gboolean on_dialog_close (GtkDialog *dlg, gboolean stay_alive) /* Defines the callback functions for all widgets and specifies * nsgtk_reflow_all_windows only where necessary */ #define ENTRY_CHANGED(x, y) gboolean on_##x##_changed(GtkWidget *widget, gpointer data) { \ - if (!g_str_equal(gtk_entry_get_text(GTK_ENTRY((x))), (y))) { \ + if (!g_str_equal(gtk_entry_get_text(GTK_ENTRY((x))), (y) ? (y) : "")) { \ LOG(("Signal emitted on '%s'", #x)); \ if ((y)) free((y)); \ (y) = strdup(gtk_entry_get_text(GTK_ENTRY((x))));