]> git.sesse.net Git - vlc/commitdiff
* modules/demux/ty.c: fixed segfault while probing.
authorGildas Bazin <gbazin@videolan.org>
Wed, 16 Mar 2005 11:11:08 +0000 (11:11 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 16 Mar 2005 11:11:08 +0000 (11:11 +0000)
modules/demux/ty.c

index 0a169e45c3b6921344109b1d8529a0c565674776..6ec7f4b3ec6e2e4a58ab23354afbcd2abff14760 100644 (file)
@@ -170,7 +170,8 @@ static int TyOpen(vlc_object_t *p_this)
         /* doesn't look like a TY file... */
         char *psz_ext = strrchr(p_demux->psz_path, '.');
         /* if they specified tydemux, or if the file ends in .ty we try anyway */
-        if (strcmp(p_demux->psz_demux, "tydemux") && strcasecmp(psz_ext, ".ty"))
+        if (psz_ext && strcmp(p_demux->psz_demux, "tydemux") &&
+            strcasecmp(psz_ext, ".ty"))
             return VLC_EGENERIC;
         msg_Warn(p_demux, "this does not look like a TY file, continuing anyway...");
     }