diff src/audacious/strings.c @ 2787:e35538325145 trunk

[svn] - add some assertions to chardet_to_utf8() to try to trace bad g_convert() calls
author nenolod
date Wed, 23 May 2007 15:45:00 -0700
parents b474ecb5bde4
children a2d234851527
line wrap: on
line diff
--- a/src/audacious/strings.c	Tue May 22 16:55:33 2007 -0700
+++ b/src/audacious/strings.c	Wed May 23 15:45:00 2007 -0700
@@ -194,8 +194,7 @@
     gchar *out_str;
 
     /* NULL in NULL out */
-    if (!str)
-        return NULL;
+    g_return_val_if_fail(str != NULL, NULL);
 
     /* Note: Currently, playlist calls this function repeatedly, even
      * if the string is already converted into utf-8.
@@ -278,6 +277,8 @@
 	bytes_write = arg_bytes_write ? arg_bytes_write : &my_bytes_write;
 	error       = arg_error ? arg_error : NULL;
 
+	g_return_val_if_fail(str != NULL, NULL);
+
 #ifdef USE_CHARDET
 	if(cfg.chardet_detector)
 		det = cfg.chardet_detector;