From 710da08c855b4f3b08ce0887db2f2927eb1d2498 Mon Sep 17 00:00:00 2001 From: rodolforg Date: Tue, 7 Sep 2021 01:18:16 -0300 Subject: [PATCH] Fix possible crash on get_local_name() of Layer_PasteCanvas (#2300) --- synfig-core/src/synfig/layers/layer_pastecanvas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synfig-core/src/synfig/layers/layer_pastecanvas.cpp b/synfig-core/src/synfig/layers/layer_pastecanvas.cpp index a133c8855bf..b467ac4580b 100644 --- a/synfig-core/src/synfig/layers/layer_pastecanvas.cpp +++ b/synfig-core/src/synfig/layers/layer_pastecanvas.cpp @@ -120,7 +120,7 @@ String Layer_PasteCanvas::get_local_name()const { if(!sub_canvas || sub_canvas->is_inline()) return String(); - if(sub_canvas->get_root()==get_canvas()->get_root()) return sub_canvas->get_id(); + if(get_canvas() && sub_canvas->get_root()==get_canvas()->get_root()) return sub_canvas->get_id(); return sub_canvas->get_file_name(); }