Don't ignore target init() failures, causes mod_libavcodec to crash synfig
authorpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 10 Mar 2007 07:54:30 +0000 (07:54 +0000)
committerpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 10 Mar 2007 07:54:30 +0000 (07:54 +0000)
git-svn-id: http://svn.voria.com/code@284 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/target_scanline.cpp
synfig-core/trunk/src/synfig/target_tile.cpp

index fe5f2a5..0d04c1c 100644 (file)
@@ -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
index 462607a..f245ed4 100644 (file)
@@ -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