]> git.sesse.net Git - mlt/commitdiff
Fix dereference before null check. (coverity-743162)
authorDan Dennedy <dan@dennedy.org>
Sat, 10 Nov 2012 19:15:54 +0000 (11:15 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 10 Nov 2012 19:15:54 +0000 (11:15 -0800)
src/modules/motion_est/filter_motion_est.c

index aaf550f125b7757f212adaf5ec47cef9b116ae84..282ace27cacbdd3a3df82a4def11235220f70002 100644 (file)
@@ -898,9 +898,9 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                {
                        mlt_geometry geometry = mlt_geometry_init( );
                        mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE(filter) );
-                       mlt_geometry_parse( geometry, property, 0, profile->width, profile->height );
                        if ( geometry )
                        {
+                               mlt_geometry_parse( geometry, property, 0, profile->width, profile->height );
                                bounds = calloc( 1, sizeof(*bounds) );
                                mlt_properties_set_data( MLT_FILTER_PROPERTIES(filter), "bounds", bounds, sizeof(*bounds), free, NULL );
                                mlt_geometry_fetch( geometry, bounds, 0 );