nodes: fixed new crash

This commit is contained in:
itsmattkc
2021-09-21 11:57:08 -07:00
parent 32d6aa141b
commit 75b4e3e257
+6
View File
@@ -92,9 +92,15 @@ NodeValue NodeTraverser::GenerateRowValueElement(const Node::ValueHint &hint, No
int value_index = GenerateRowValueElementIndex(hint, preferred_type, table);
if (value_index == -1) {
// If value was -1, try getting the last value
value_index = table->Count() - 1;
}
if (value_index == -1) {
// If value is still -1, assume the table is empty and return nothing
return NodeValue();
}
return table->TakeAt(value_index);
}