From 8859c01192b5c1d2fd417cd3da2ce92093072cd9 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Thu, 9 May 2013 21:45:45 -0700 Subject: [PATCH] Fix crash regression in commit 44be0cb (SF-195). --- src/framework/mlt_frame.c | 2 +- src/framework/mlt_profile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2