Commit 47e2835f authored by gbazin's avatar gbazin
Browse files

* fixed a segfault I introduced lately in gtk_preferences.
parent 36180ab1
......@@ -2,7 +2,7 @@
* gtk_preferences.c: functions to handle the preferences dialog box.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_preferences.c,v 1.28 2002/05/18 13:30:28 gbazin Exp $
* $Id: gtk_preferences.c,v 1.29 2002/05/19 20:26:11 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Loc Minier <lool@via.ecp.fr>
......@@ -723,6 +723,8 @@ static void GtkIntChanged( GtkEditable *editable, gpointer user_data )
GHashTable *hash_table;
GtkWidget *apply_button;
gtk_spin_button_update( GTK_SPIN_BUTTON(editable) );
hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data),
"config_hash_table" );
......@@ -733,7 +735,6 @@ static void GtkIntChanged( GtkEditable *editable, gpointer user_data )
p_config = malloc( sizeof(module_config_t) );
p_config->i_type = MODULE_CONFIG_ITEM_INTEGER;
gtk_spin_button_update( GTK_SPIN_BUTTON(editable) );
p_config->i_value = gtk_spin_button_get_value_as_int(
GTK_SPIN_BUTTON(editable) );
p_config->psz_name = (char *)gtk_object_get_data( GTK_OBJECT(editable),
......@@ -758,6 +759,8 @@ static void GtkFloatChanged( GtkEditable *editable, gpointer user_data )
GHashTable *hash_table;
GtkWidget *apply_button;
gtk_spin_button_update( GTK_SPIN_BUTTON(editable) );
hash_table = (GHashTable *)gtk_object_get_data( GTK_OBJECT(user_data),
"config_hash_table" );
......@@ -768,7 +771,6 @@ static void GtkFloatChanged( GtkEditable *editable, gpointer user_data )
p_config = malloc( sizeof(module_config_t) );
p_config->i_type = MODULE_CONFIG_ITEM_FLOAT;
gtk_spin_button_update( GTK_SPIN_BUTTON(editable) );
p_config->f_value = gtk_spin_button_get_value_as_float(
GTK_SPIN_BUTTON(editable) );
p_config->psz_name = (char *)gtk_object_get_data( GTK_OBJECT(editable),
......@@ -836,7 +838,7 @@ static void GtkFreeHashValue( gpointer key, gpointer value, gpointer user_data)
module_config_t *p_config = (module_config_t *)value;
if( p_config->i_type == MODULE_CONFIG_ITEM_STRING )
g_free( p_config->psz_value );
if( p_config->psz_value ) g_free( p_config->psz_value );
free( p_config );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment