changeset 9434:9e8931fef1c1 libavcodec

avoid strcmp NULL, fix segv on mingw
author bcoudurier
date Tue, 14 Apr 2009 00:12:29 +0000
parents 70afd9081b3f
children adbd43ffeada
files imgconvert.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/imgconvert.c	Mon Apr 13 20:44:42 2009 +0000
+++ b/imgconvert.c	Tue Apr 14 00:12:29 2009 +0000
@@ -494,7 +494,7 @@
     int i;
 
     for (i=0; i < PIX_FMT_NB; i++)
-         if (!strcmp(pix_fmt_info[i].name, name))
+        if (pix_fmt_info[i].name && !strcmp(pix_fmt_info[i].name, name))
              return i;
     return PIX_FMT_NONE;
 }