changeset 1761:70caa62ead63 trunk

[svn] - fix for "bmp_rcfile_write_string: assertion `value != NULL' failed"
author yaz
date Thu, 28 Sep 2006 08:39:14 -0700
parents 47dcc46bb091
children 5170463d8cc9
files ChangeLog audacious/controlsocket.c audacious/main.c audacious/prefswin.c
diffstat 4 files changed, 27 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 28 08:36:43 2006 -0700
+++ b/ChangeLog	Thu Sep 28 08:39:14 2006 -0700
@@ -1,3 +1,11 @@
+2006-09-28 15:36:43 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [2457]
+  - fix for "playlist.c:1482: Mutex not locked!"
+  
+  trunk/audacious/playlist.c |    2 ++
+  1 file changed, 2 insertions(+)
+
+
 2006-09-24 19:08:30 +0000  Tony Vroon <chainsaw@gentoo.org>
   revision [2455]
   Interpret set_string for a NULL value as a key unset action, as gconf will not store NULL values.
--- a/audacious/controlsocket.c	Thu Sep 28 08:36:43 2006 -0700
+++ b/audacious/controlsocket.c	Thu Sep 28 08:39:14 2006 -0700
@@ -87,10 +87,10 @@
 gboolean
 ctrlsocket_setup(void)
 {
-    audacious_set_session_uri(cfg.session_uri_base);
-
-    if (cfg.session_uri_base == NULL)
-	return ctrlsocket_setup_unix();
+    if (strcmp(cfg.session_uri_base, ""))
+        audacious_set_session_uri(cfg.session_uri_base);
+    else
+        return ctrlsocket_setup_unix();
 
     if (!g_strncasecmp(cfg.session_uri_base, "tcp://", 6))
 	return ctrlsocket_setup_tcp();
--- a/audacious/main.c	Thu Sep 28 08:36:43 2006 -0700
+++ b/audacious/main.c	Thu Sep 28 08:39:14 2006 -0700
@@ -566,11 +566,17 @@
     if (!cfg.eqpreset_extension)
         cfg.eqpreset_extension = g_strdup(EQUALIZER_DEFAULT_PRESET_EXT);
 
+    if (!cfg.chardet_fallback)
+        cfg.chardet_fallback = g_strdup("");
+
     if (!cfg.cover_name_include)
 	    cfg.cover_name_include = g_strdup("");
 
     if (!cfg.cover_name_exclude)
 	    cfg.cover_name_exclude = g_strdup("back");
+
+    if (!cfg.session_uri_base)
+        cfg.session_uri_base = g_strdup("");
 }
 
 
--- a/audacious/prefswin.c	Thu Sep 28 08:36:43 2006 -0700
+++ b/audacious/prefswin.c	Thu Sep 28 08:39:14 2006 -0700
@@ -1929,7 +1929,7 @@
 on_chardet_detector_cbox_changed(GtkComboBox * combobox, gpointer data)
 {
     ConfigDb *db;
-    gint position;
+    gint position = 0;
 
     position = gtk_combo_box_get_active(GTK_COMBO_BOX(combobox));
     cfg.chardet_detector = (char *)chardet_detector_presets[position];
@@ -2002,15 +2002,21 @@
 on_chardet_fallback_changed(GtkEntry *entry, gpointer data)
 {
     ConfigDb *db;
+    gchar *ret = NULL;
 
     if(cfg.chardet_fallback)
         g_free(cfg.chardet_fallback);
 
-    cfg.chardet_fallback = g_strdup(gtk_entry_get_text(entry));
+    ret = g_strdup(gtk_entry_get_text(entry));
+
+    if(ret == NULL)
+        cfg.chardet_fallback = g_strdup("");
+    else
+        cfg.chardet_fallback = ret;
 
     db = bmp_cfg_db_open();
 
-    if(!strncasecmp(cfg.chardet_fallback, "", sizeof("")))
+    if(cfg.chardet_fallback == NULL || !strcmp(cfg.chardet_fallback, ""))
         bmp_cfg_db_set_string(db, NULL, "chardet_fallback", "None");
     else
         bmp_cfg_db_set_string(db, NULL, "chardet_fallback", cfg.chardet_fallback);