# HG changeset patch # User William Pitcock # Date 1195347771 21600 # Node ID 838098201ac97f90eb359735a76e9bf36420da1f # Parent 3c9527d253463f7207a7feae02386d52fa2694f8 fix loading of streams from XSPF files. diff -r 3c9527d25346 -r 838098201ac9 src/xspf/xspf.c --- a/src/xspf/xspf.c Sat Nov 17 03:41:41 2007 +0900 +++ b/src/xspf/xspf.c Sat Nov 17 19:02:51 2007 -0600 @@ -191,9 +191,15 @@ /* filename and path in tuple must be unescaped. */ scratch = g_filename_from_uri(location, NULL, NULL); - realfn = aud_str_to_utf8(scratch ? scratch : location); - uri = aud_str_to_utf8(scratch ? location : scratch); - g_free(scratch); + + if (scratch != NULL) { + realfn = aud_str_to_utf8(scratch ? scratch : location); + uri = aud_str_to_utf8(scratch ? location : scratch); + g_free(scratch); + } else { + realfn = g_strdup(location); + uri = g_strdup(location); + } scratch = g_path_get_basename(realfn); aud_tuple_associate_string(tuple, FIELD_FILE_NAME, NULL, scratch);