# HG changeset patch # User William Pitcock # Date 1189160451 18000 # Node ID 16c1ca141387ac02159e4f30f464cec61993b335 # Parent 16044c4a34d7959f274bf87c80b546f8677adc14 Fix bugzilla #8. diff -r 16044c4a34d7 -r 16c1ca141387 src/scrobbler/fmt.c --- a/src/scrobbler/fmt.c Fri Sep 07 05:19:03 2007 -0500 +++ b/src/scrobbler/fmt.c Fri Sep 07 05:20:51 2007 -0500 @@ -9,11 +9,17 @@ char *fmt_escape(const char *str) { + if (str == NULL) + return ""; + return curl_escape(str, 0); } char *fmt_unescape(char *str) { + if (str == NULL) + return ""; + return curl_unescape(str, 0); } diff -r 16044c4a34d7 -r 16c1ca141387 src/scrobbler/scrobbler.c --- a/src/scrobbler/scrobbler.c Fri Sep 07 05:19:03 2007 -0500 +++ b/src/scrobbler/scrobbler.c Fri Sep 07 05:20:51 2007 -0500 @@ -146,7 +146,7 @@ item->mb = fmt_escape((char*)tuple->mb); #endif - if((album = tuple_get_string(tuple, "album"))) + if((album = tuple_get_string(tuple, "album")) != NULL) item->album = fmt_escape(""); else item->album = fmt_escape((char*) album);