From: pabs Date: Sat, 10 Mar 2007 07:54:30 +0000 (+0000) Subject: Don't ignore target init() failures, causes mod_libavcodec to crash synfig X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=49b7555d9c8ae6590a56b5dcc82f34ee8b025e34;p=synfig.git Don't ignore target init() failures, causes mod_libavcodec to crash synfig git-svn-id: http://svn.voria.com/code@284 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/target_scanline.cpp b/synfig-core/trunk/src/synfig/target_scanline.cpp index fe5f2a5..0d04c1c 100644 --- a/synfig-core/trunk/src/synfig/target_scanline.cpp +++ b/synfig-core/trunk/src/synfig/target_scanline.cpp @@ -124,7 +124,10 @@ synfig::Target_Scanline::render(ProgressCallback *cb) assert(canvas); curr_frame_=0; - init(); + if( !init() ){ + if(cb) cb->error(_("Target initialisation failure")); + return false; + } // If the description's end frame is equal to // the start frame, then it is assumed that we diff --git a/synfig-core/trunk/src/synfig/target_tile.cpp b/synfig-core/trunk/src/synfig/target_tile.cpp index 462607a..f245ed4 100644 --- a/synfig-core/trunk/src/synfig/target_tile.cpp +++ b/synfig-core/trunk/src/synfig/target_tile.cpp @@ -306,6 +306,11 @@ synfig::Target_Tile::render(ProgressCallback *cb) assert(canvas); curr_frame_=0; init(); + if( !init() ){ + if(cb) cb->error(_("Target initialisation failure")); + return false; + } + // If the description's end frame is equal to // the start frame, then it is assumed that we