Don't ignore target init() failures, causes mod_libavcodec to crash synfig
[synfig.git] / synfig-core / trunk / src / synfig / target_scanline.cpp
index 5c33cf3..0d04c1c 100644 (file)
@@ -5,16 +5,17 @@
 **     $Id: target_scanline.cpp,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
 **
 **     \legal
-**     Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **
-**     This software and associated documentation
-**     are CONFIDENTIAL and PROPRIETARY property of
-**     the above-mentioned copyright holder.
+**     This package is free software; you can redistribute it and/or
+**     modify it under the terms of the GNU General Public License as
+**     published by the Free Software Foundation; either version 2 of
+**     the License, or (at your option) any later version.
 **
-**     You may not copy, print, publish, or in any
-**     other way distribute this software without
-**     a prior written agreement with
-**     the copyright holder.
+**     This package is distributed in the hope that it will be useful,
+**     but WITHOUT ANY WARRANTY; without even the implied warranty of
+**     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+**     General Public License for more details.
 **     \endlegal
 */
 /* ========================================================================= */
@@ -49,7 +50,7 @@ using namespace synfig;
 
 #define PIXEL_RENDERING_LIMIT 1500000
 
-#define USE_PIXELRENDERING_LIMIT 0
+#define USE_PIXELRENDERING_LIMIT 1
 
 /* === G L O B A L S ======================================================= */
 
@@ -123,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