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
This commit is contained in:
reimar 2009-01-25 18:23:05 +00:00
parent 9e48ce48d4
commit 84fbeecf72
1 changed files with 1 additions and 1 deletions

View File

@ -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];
}