Mercurial > audlegacy
changeset 4201:5f92bee6cd5b
possible fix for (Bugzilla #35), waiting for some feedback from Tarmaq...
author | Cristi Magherusan <majeru@atheme.org> |
---|---|
date | Sun, 20 Jan 2008 01:24:15 +0200 |
parents | 5aab99923422 |
children | 6fd286e77317 |
files | src/audacious/strings.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/strings.c Sat Jan 19 18:32:46 2008 +0200 +++ b/src/audacious/strings.c Sun Jan 20 01:24:15 2008 +0200 @@ -149,7 +149,8 @@ gboolean str_has_prefix_nocase(const gchar * str, const gchar * prefix) { - return (strncasecmp(str, prefix, strlen(prefix)) == 0); + /* strncasecmp causes segfaults when str is NULL*/ + return (str && (strncasecmp(str, prefix, strlen(prefix)) == 0)); } gboolean