From abf91b0648be40fb2bcb407fe75a28619f0527bc Mon Sep 17 00:00:00 2001 From: Erwan Croze Date: Wed, 23 Aug 2017 17:08:37 +0200 Subject: [PATCH] Fix function linphone_video_definition_equals --- coreapi/video_definition.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/coreapi/video_definition.c b/coreapi/video_definition.c index 57329d154..d193d0363 100644 --- a/coreapi/video_definition.c +++ b/coreapi/video_definition.c @@ -101,8 +101,9 @@ void linphone_video_definition_set_name(LinphoneVideoDefinition *vdef, const cha } bool_t linphone_video_definition_equals(const LinphoneVideoDefinition *vdef1, const LinphoneVideoDefinition *vdef2) { - return (((vdef1->width == vdef2->width) && (vdef1->height == vdef2->height)) - || ((vdef1->width == vdef2->height) && (vdef1->height == vdef2->width))); + return ((vdef1 != NULL && vdef2 != NULL) + && (((vdef1->width == vdef2->width) && (vdef1->height == vdef2->height)) + || ((vdef1->width == vdef2->height) && (vdef1->height == vdef2->width)))); } bool_t linphone_video_definition_strict_equals(const LinphoneVideoDefinition *vdef1, const LinphoneVideoDefinition *vdef2) {