From: Yaowu Xu Date: Tue, 20 Aug 2013 00:16:12 +0000 (-0700) Subject: fix a bug when null function pointer is used. X-Git-Tag: v1.3.0~582 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f70330a906fc42bbb6f7100ed1ad5800007b96bc;p=libvpx fix a bug when null function pointer is used. For certain partition size, the function poniter may not be intialized at all. The patch prevent the call if the pointer is not set. Change-Id: I78b8c3992b639e8799a16b3c74f0973d07b8b9ac --- diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c index b6515e697..55e4c36de 100644 --- a/vp9/encoder/vp9_mcomp.c +++ b/vp9/encoder/vp9_mcomp.c @@ -1824,7 +1824,7 @@ int vp9_full_search_sadx8(MACROBLOCK *x, int_mv *ref_mv, } } - while ((c + 2) < col_max) { + while ((c + 2) < col_max && fn_ptr->sdx3f != NULL) { int i; fn_ptr->sdx3f(what, what_stride, check_here, in_what_stride, sad_array);