mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-01 08:44:25 +03:00
Ensure that unset string options do not crash when you try and set them
svn path=/trunk/netsurf/; revision=5591
This commit is contained in:
parent
174a8dcca2
commit
d9f9bda135
@ -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))));
|
||||
|
Loading…
Reference in New Issue
Block a user