Fixed GnomeUI segfault on the config file update.
authorshort <>
Sun, 23 May 2004 12:40:28 +0000 (12:40 +0000)
committershort <>
Sun, 23 May 2004 12:40:28 +0000 (12:40 +0000)
src/ui-gnome.c

index 1883b6a..79546bb 100644 (file)
@@ -123,6 +123,9 @@ void on_ButtonHide_clicked(GtkButton *button,gpointer user_data)
 {
        g_return_if_fail(GTK_IS_BUTTON(button));
 
+       /* update config file */
+       optarg_port_set_string(gtk_entry_get_text(PortEntry));
+
        /* Do not: gtk_main_quit();
         * as 'App' widget will quit our gtk_main() automatically.
         */
@@ -163,7 +166,6 @@ GtkWidget *dialog;
 static void ui_gnome_interactive(void)
 {
        gtk_main();
-       optarg_port_set_string(gtk_entry_get_text(PortEntry));  /* update config file */
        network_notify_hostip=NULL;
        g_log_remove_handler(
                        G_LOG_DOMAIN,   /* log_domain; "Captive" */