From d20549b27a9645519ed86d573b934e5e70094ffb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 3 Feb 2016 17:37:15 +0100 Subject: [PATCH] vhdlpp: Fixed a crash in case of dynamic_cast failure. --- vhdlpp/architec_elaborate.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vhdlpp/architec_elaborate.cc b/vhdlpp/architec_elaborate.cc index e35209f33..87294ebfb 100644 --- a/vhdlpp/architec_elaborate.cc +++ b/vhdlpp/architec_elaborate.cc @@ -258,6 +258,8 @@ int ProcessStatement::rewrite_as_always_edge_(Entity*, Architecture*) return -1; const ExpCharacter*op2b = dynamic_cast(op2b_raw); + if (op2b == 0) + return -1; if (op2b->value() != '1' && op2b->value() != '0') return -1;