changeset 761:363f8644bce7 trunk

[svn] - sanity checks here
author nenolod
date Tue, 28 Feb 2006 14:56:30 -0800
parents aa6d333a0dd7
children a22aa7bfa108
files Plugins/Input/mpg123/mpg123.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/mpg123/mpg123.c	Tue Feb 28 14:36:33 2006 -0800
+++ b/Plugins/Input/mpg123/mpg123.c	Tue Feb 28 14:56:30 2006 -0800
@@ -293,9 +293,9 @@
 {
     gchar *ext = strrchr(filename, '.');
 
-    if (!strncasecmp(filename, "http://", 7) && (strncasecmp(ext, ".ogg", 4)))
+    if (!strncasecmp(filename, "http://", 7) && (ext && strncasecmp(ext, ".ogg", 4)))
 	return TRUE;
-    else if (strncasecmp(ext, ".mp3", 4))	/* If extension ends in .mp3, let it be --nenolod */
+    else if (ext && strncasecmp(ext, ".mp3", 4))	/* If extension ends in .mp3, let it be --nenolod */
         return (mpg123_detect_by_content(filename));
 
     return TRUE;	/* Why? The file ends in .mp3. Lalala. */