]> git.sesse.net Git - mlt/commitdiff
fix possible null pointer dereference (coverity-709393)
authorDan Dennedy <dan@dennedy.org>
Fri, 17 Aug 2012 06:24:43 +0000 (23:24 -0700)
committerDan Dennedy <dan@dennedy.org>
Fri, 17 Aug 2012 06:24:43 +0000 (23:24 -0700)
src/framework/mlt_consumer.c

index 5334e94384af621e0efb35e34b7fd69d67fb6102..b54f8dc4927277f76c3281fb19fd1662887c3328 100644 (file)
@@ -242,9 +242,11 @@ static void mlt_consumer_property_changed( mlt_properties owner, mlt_consumer se
        {
                mlt_properties properties = MLT_CONSUMER_PROPERTIES( self );
                mlt_profile profile = mlt_service_profile( MLT_CONSUMER_SERVICE( self ) );
-               profile->sample_aspect_den = mlt_properties_get_int( properties, "sample_aspect_den" );
                if ( profile )
+               {
+                       profile->sample_aspect_den = mlt_properties_get_int( properties, "sample_aspect_den" );
                        mlt_properties_set_double( properties, "aspect_ratio", mlt_profile_sar( profile )  );
+               }
        }
        else if ( !strcmp( name, "display_aspect_num" ) )
        {