Commit 4b28b524 authored by Harriet Brown's avatar Harriet Brown
Browse files

fix failing test that uses getAttribute

This commit fixes a text that uses getAttribute but putting the same m_function.size check that get parameter uses.
parent d518202c
......@@ -278,7 +278,9 @@ bool CompositeFunction::hasAttribute(const std::string &name) const {
return true;
const auto [attributeName, index] = parseName(name);
return m_functions[index]->hasAttribute(attributeName);
return index < m_functions.size()
? m_functions[index]->hasAttribute(attributeName)
: false;
} catch (std::invalid_argument &) {
return false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment