Prevent a crash when copying a PasteCanvas before defining its canvas parameter.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 3 Sep 2007 11:38:06 +0000 (11:38 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 3 Sep 2007 11:38:06 +0000 (11:38 +0000)
git-svn-id: http://svn.voria.com/code@575 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/layer.cpp

index 8d6ae4a..6a36ca9 100644 (file)
@@ -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.