From: Dan Dennedy Date: Fri, 10 May 2013 04:45:45 +0000 (-0700) Subject: Fix crash regression in commit 44be0cb (SF-195). X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8859c01192b5c1d2fd417cd3da2ce92093072cd9;p=mlt Fix crash regression in commit 44be0cb (SF-195). --- diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index 1c313fc5..44df88e8 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -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; diff --git a/src/framework/mlt_profile.c b/src/framework/mlt_profile.c index 06fa2c32..bb496eb3 100644 --- a/src/framework/mlt_profile.c +++ b/src/framework/mlt_profile.c @@ -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;