From 0ca178212d944cebe988be1d05f76f383335542a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Thu, 25 Apr 2024 16:37:56 +0200
Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20incorrect=20dereferencing?=
 =?UTF-8?q?=20of=20std::optional=20without=20a=20value?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Bug introduced in 0eb11d3323fc407f8b991529c41b643e2a5b83aa.

(cherry picked from commit 097f706c55b56d63a26781b38d8c90d48d7b2589)
---
 src/ExprNode.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index 509b4f2e..159db131 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -422,7 +422,7 @@ ExprNode::fillErrorCorrectionRow(int eqn, const vector<int>& nontarget_lhs,
                      << endl;
                 exit(EXIT_FAILURE);
               }
-            if (*param_id)
+            if (param_id)
               {
                 cerr
                     << "ERROR in trend component model: spurious parameter in error correction term"
-- 
GitLab