From: dooglus Date: Mon, 3 Sep 2007 11:38:06 +0000 (+0000) Subject: Prevent a crash when copying a PasteCanvas before defining its canvas parameter. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=75ea37961f95850594aeee5fc8b4586276466193;p=synfig.git Prevent a crash when copying a PasteCanvas before defining its canvas parameter. git-svn-id: http://svn.voria.com/code@575 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/layer.cpp b/synfig-core/trunk/src/synfig/layer.cpp index 8d6ae4a..6a36ca9 100644 --- a/synfig-core/trunk/src/synfig/layer.cpp +++ b/synfig-core/trunk/src/synfig/layer.cpp @@ -324,7 +324,7 @@ Layer::clone(const GUID& deriv_guid) const // This parameter is a canvas. We need a close look. Canvas::Handle canvas(iter->second.get(Canvas::Handle())); - if(canvas->is_inline()) + if(canvas && canvas->is_inline()) { // This parameter is an inlinecanvas! we need to clone it // before we set it as aparameter.