From 84fbeecf72da4d24cfc7719da03649a6fd530321 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 25 Jan 2009 18:23:05 +0000 Subject: [PATCH] Fix a NULL-check that used && instead of || and thus could not avoid crashes. Patch by Luis Felipe Strano Moraes (luis strano gmail com). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28354 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/freesdp/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/freesdp/parser.c b/stream/freesdp/parser.c index 33bc1d59b5..c17041b7ba 100644 --- a/stream/freesdp/parser.c +++ b/stream/freesdp/parser.c @@ -1644,7 +1644,7 @@ const char * fsdp_get_media_format (const fsdp_media_description_t * dsc, unsigned int index) { - if (!dsc && (index < dsc->formats_count)) + if (!dsc || (index < dsc->formats_count)) return NULL; return dsc->formats[index]; }