Fix 1356449: don't crash when creating a PasteCanvas by not accessing a NULL pointer
authorpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 14 Aug 2007 12:37:12 +0000 (12:37 +0000)
committerpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 14 Aug 2007 12:37:12 +0000 (12:37 +0000)
git-svn-id: http://svn.voria.com/code@553 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/layerparamtreestore.cpp

index 8e0739a..928208c 100644 (file)
@@ -400,8 +400,9 @@ LayerParamTreeStore::rebuild()
                }
                if(value_desc.get_value_type()==ValueBase::TYPE_CANVAS)
                {
-                       changed_connection_list.push_back(
-                               value_desc.get_value().get(Canvas::Handle())->signal_changed().connect(
+                       Canvas::Handle canvas_handle = value_desc.get_value().get(Canvas::Handle());
+                       if(canvas_handle) changed_connection_list.push_back(
+                               canvas_handle->signal_changed().connect(
                                        sigc::mem_fun(
                                                this,
                                                &LayerParamTreeStore::changed