diff --git a/src/BeamAdapter/component/WireBeamInterpolation.inl b/src/BeamAdapter/component/WireBeamInterpolation.inl index 4bd95cf7..04f0b562 100644 --- a/src/BeamAdapter/component/WireBeamInterpolation.inl +++ b/src/BeamAdapter/component/WireBeamInterpolation.inl @@ -269,10 +269,10 @@ typename T::SPtr WireBeamInterpolation::create(T* tObj, core::object { WireRestShape* _restShape = nullptr; std::string _restShapePath; - bool pathOK = false; - if(arg) + if(arg && context) { + bool pathOK = false; if (arg->getAttribute("WireRestShape",nullptr) != nullptr) { _restShapePath = arg->getAttribute("WireRestShape");