]> git.sesse.net Git - mlt/commitdiff
Fix crash regression in commit 44be0cb (SF-195).
authorDan Dennedy <dan@dennedy.org>
Fri, 10 May 2013 04:45:45 +0000 (21:45 -0700)
committerDan Dennedy <dan@dennedy.org>
Fri, 10 May 2013 04:45:45 +0000 (21:45 -0700)
src/framework/mlt_frame.c
src/framework/mlt_profile.c

index 1c313fc56bcec552929dac5437065882f4c53371..44df88e80bc4f0f9618f861e792391b2cdd6d530 100644 (file)
@@ -474,7 +474,7 @@ static int generate_test_image( mlt_properties properties, uint8_t **buffer,  ml
                        mlt_properties_set_data( properties, "test_card_producer", NULL, 0, NULL, NULL );
                }
        }
-       if ( error )
+       if ( error && *buffer && *format != mlt_image_none )
        {
                int size = 0;
 
index 06fa2c3212b505f4c9d9cfe1e2aeda601568e3dd..bb496eb3cd3353dda4024d871e5f36f3407cfbb2 100644 (file)
@@ -402,7 +402,7 @@ mlt_properties mlt_profile_list( )
 void mlt_profile_from_producer( mlt_profile profile, mlt_producer producer )
 {
        mlt_frame fr = NULL;
-       uint8_t *buffer;
+       uint8_t *buffer = NULL;
        mlt_image_format fmt = mlt_image_none;
        mlt_properties p;
        int w = profile->width;