diff audacious/prefswin.c @ 1864:0f39dea9f26e trunk

[svn] - some fixes via alxorlov on the forums
author nenolod
date Thu, 12 Oct 2006 05:02:14 -0700
parents cc910a778b5f
children 597bd579d9af
line wrap: on
line diff
--- a/audacious/prefswin.c	Thu Oct 12 04:52:51 2006 -0700
+++ b/audacious/prefswin.c	Thu Oct 12 05:02:14 2006 -0700
@@ -1923,7 +1923,8 @@
     db = bmp_cfg_db_open();
     bmp_cfg_db_set_string(db, NULL, "chardet_detector", cfg.chardet_detector);
     bmp_cfg_db_close(db);
-    gtk_widget_set_sensitive(GTK_WIDGET(data), 1);
+    if (data != NULL)
+        gtk_widget_set_sensitive(GTK_WIDGET(data), 1);
 }
 
 static void
@@ -1950,7 +1951,10 @@
 
 #ifdef USE_CHARDET
     gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), index);
-    gtk_widget_set_sensitive(GTK_WIDGET(data), 1);
+
+    if (data != NULL)
+        gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
+
     g_signal_connect(combobox, "changed",
                      G_CALLBACK(on_chardet_detector_cbox_changed), NULL);
 #else