]> git.sesse.net Git - mlt/commitdiff
fix segfault on invalid producer in playlist (3574646)
authorDan Dennedy <dan@dennedy.org>
Wed, 10 Oct 2012 02:23:32 +0000 (19:23 -0700)
committerDan Dennedy <dan@dennedy.org>
Wed, 10 Oct 2012 02:23:32 +0000 (19:23 -0700)
src/modules/xml/producer_xml.c

index fa5d4d5bfa2f503685f608aadc625dd168178c43..aa3dc917b4c413c59e032434282f2e05b8133f5c 100644 (file)
@@ -160,8 +160,11 @@ static mlt_service context_pop_service( deserialise_context context, enum servic
                if ( type != NULL )
                        *type = context->stack_types[ context->stack_service_size ];
                // Set the service's profile and locale so mlt_property time-to-position conversions can get fps
-               mlt_properties_set_data( MLT_SERVICE_PROPERTIES( result ), "_profile", context->profile, 0, NULL, NULL );
-               mlt_properties_set_lcnumeric( MLT_SERVICE_PROPERTIES( result ), context->lc_numeric );
+               if ( result )
+               {
+                       mlt_properties_set_data( MLT_SERVICE_PROPERTIES( result ), "_profile", context->profile, 0, NULL, NULL );
+                       mlt_properties_set_lcnumeric( MLT_SERVICE_PROPERTIES( result ), context->lc_numeric );
+               }
        }
        return result;
 }