From 530d4d24271a00db6cfcc062360912ae5f8a7fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 10 Oct 2019 20:29:36 +0200 Subject: [PATCH] ExprEngine: Throw exception if we do not handle array well yet --- lib/exprengine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/exprengine.cpp b/lib/exprengine.cpp index 900354066..255f7f110 100644 --- a/lib/exprengine.cpp +++ b/lib/exprengine.cpp @@ -580,6 +580,9 @@ struct ExprData { } if (auto c = std::dynamic_pointer_cast(v)) { + if (c->values.empty()) + throw VerifyException(nullptr, "ConditionalValue is empty"); + if (c->values.size() == 1) return getExpr(c->values[0].second);