Fix possible crash when right click on a Paste Canvas Layer that doesn't have a canva...
[synfig.git] / synfig-studio / src / synfigapp / actions / layerparamunsetstatic.cpp
index 4012c9e..08cc5f8 100644 (file)
@@ -102,6 +102,10 @@ Action::LayerParamUnSetStatic::is_candidate(const ParamList &x)
 
        //! Retrieves the current parameter
        parameter = _layer->get_param(_param_name);
+       //! Check that the parameter is not a inline canvas
+       if(parameter.get_type()==ValueBase::TYPE_CANVAS)
+               if(parameter.get(Canvas::Handle())->is_inline() && parameter.get(Canvas::Handle()))
+                       return false;
        //! Check if it is not static
        if(!parameter.get_static())
                return false;