]> granicus.if.org Git - libvpx/commitdiff
fix a bug when null function pointer is used.
authorYaowu Xu <yaowu@google.com>
Tue, 20 Aug 2013 00:16:12 +0000 (17:16 -0700)
committerYaowu Xu <yaowu@google.com>
Tue, 20 Aug 2013 00:16:12 +0000 (17:16 -0700)
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

vp9/encoder/vp9_mcomp.c

index b6515e6975dda18b6b8b0468159e855915c1b06e..55e4c36debd3db3af6eb82b8c5d0317ac6cfdd82 100644 (file)
@@ -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);