From 51e6802aa74f9e59a2f7941c039640ed883e7537 Mon Sep 17 00:00:00 2001 From: jeremy Date: Mon, 24 Oct 2022 15:44:57 +0200 Subject: [PATCH] Safeguard in case ComputeExpression is called without opt --- src/storage/v3/expr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/v3/expr.cpp b/src/storage/v3/expr.cpp index 1d6739433..eaff472bd 100644 --- a/src/storage/v3/expr.cpp +++ b/src/storage/v3/expr.cpp @@ -186,7 +186,7 @@ TypedValue ComputeExpression(DbAccessor &dba, const std::optional(expr))->Accept(symbol_generator); - if (node_identifier.symbol_pos_ != -1) { + if (node_identifier.symbol_pos_ != -1 && v_acc.has_value()) { MG_ASSERT(std::find_if(symbol_table.table().begin(), symbol_table.table().end(), [&node_name](const std::pair &position_symbol_pair) { return position_symbol_pair.second.name() == node_name; @@ -195,7 +195,7 @@ TypedValue ComputeExpression(DbAccessor &dba, const std::optional &position_symbol_pair) { return position_symbol_pair.second.name() == edge_name;