diff --git a/Framework/Algorithms/src/ReflectometrySumInQ.cpp b/Framework/Algorithms/src/ReflectometrySumInQ.cpp index 290260132aca37fc90cbce5d2a88aa0e163eff6b..dcc7a807b636c6ba4edaf19092421e8b95ed9d5b 100644 --- a/Framework/Algorithms/src/ReflectometrySumInQ.cpp +++ b/Framework/Algorithms/src/ReflectometrySumInQ.cpp @@ -269,8 +269,18 @@ std::map<std::string, std::string> ReflectometrySumInQ::validateInputs() { std::map<std::string, std::string> issues; API::MatrixWorkspace_sptr inWS; Indexing::SpectrumIndexSet indices; - std::tie(inWS, indices) = - getWorkspaceAndIndices<API::MatrixWorkspace>(Prop::INPUT_WS); + + // validateInputs is called on the individual workspaces when the algorithm + // is executed, it but may get called on a group from AlgorithmDialog. This + // isn't handled in getWorkspaceAndIndices. We should fix this properly but + // for now skip validation for groups to avoid an exception. See #22933 + try { + std::tie(inWS, indices) = + getWorkspaceAndIndices<API::MatrixWorkspace>(Prop::INPUT_WS); + } catch (std::runtime_error &) { + return issues; + } + const auto &spectrumInfo = inWS->spectrumInfo(); const int beamCentre = getProperty(Prop::BEAM_CENTRE); bool beamCentreFound{false};