From 49739f508a1d2d1c15bead8cc1e6104a847513cd Mon Sep 17 00:00:00 2001 From: pabs Date: Tue, 14 Aug 2007 09:50:09 +0000 Subject: [PATCH] Fix segfault when rendering http://dooglus.rincevent.net/synfig/crasher3.sif git-svn-id: http://svn.voria.com/code@552 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/canvas.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synfig-core/trunk/src/synfig/canvas.cpp b/synfig-core/trunk/src/synfig/canvas.cpp index aba6730..dcb702f 100644 --- a/synfig-core/trunk/src/synfig/canvas.cpp +++ b/synfig-core/trunk/src/synfig/canvas.cpp @@ -1039,7 +1039,9 @@ synfig::optimize_layers(Context context, Canvas::Handle op_canvas) if(layer->get_name()=="PasteCanvas" && paste_canvas->get_time_offset()==0) { Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas)); - optimize_layers(paste_canvas->get_sub_canvas()->get_context(),sub_canvas); + Canvas::Handle paste_sub_canvas = paste_canvas->get_sub_canvas(); + if(paste_sub_canvas) + optimize_layers(paste_sub_canvas->get_context(),sub_canvas); //#define SYNFIG_OPTIMIZE_PASTE_CANVAS 1 #ifdef SYNFIG_OPTIMIZE_PASTE_CANVAS -- 2.7.4