changeset 28319:0c7a9144e5f0

Fix a NULL-check that used && instead of || and thus could not avoid crashes. Patch by Luis Felipe Strano Moraes (luis strano gmail com).
author reimar
date Sun, 25 Jan 2009 18:23:05 +0000
parents 6142aa6d6f38
children aac3629b180d
files stream/freesdp/parser.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/freesdp/parser.c	Sun Jan 25 12:03:28 2009 +0000
+++ b/stream/freesdp/parser.c	Sun Jan 25 18:23:05 2009 +0000
@@ -1644,7 +1644,7 @@
 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];
 }