From 076a0ce77b8ce09cf042d77555a82d5b27cb4202 Mon Sep 17 00:00:00 2001
From: Stefan Pranger <stefan.pranger@student.tugraz.at>
Date: Tue, 16 Mar 2021 18:46:38 +0100
Subject: [PATCH] fixed check for presence of shielding expressions

---
 src/storm/storage/jani/Property.cpp | 2 +-
 src/storm/storage/jani/Property.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/storm/storage/jani/Property.cpp b/src/storm/storage/jani/Property.cpp
index 063e18ee0..ab4510b70 100644
--- a/src/storm/storage/jani/Property.cpp
+++ b/src/storm/storage/jani/Property.cpp
@@ -87,7 +87,7 @@ namespace storm {
         }
 
         bool Property::isShieldingProperty() const {
-            return shieldingExpression.is_initialized();
+            return shieldingExpression != boost::none && shieldingExpression.get() != nullptr;
         }
 
         std::shared_ptr<storm::logic::ShieldExpression const> Property::getShieldingExpression() const {
diff --git a/src/storm/storage/jani/Property.h b/src/storm/storage/jani/Property.h
index d2b4ec32e..4f3805afe 100644
--- a/src/storm/storage/jani/Property.h
+++ b/src/storm/storage/jani/Property.h
@@ -156,7 +156,7 @@ namespace storm {
             std::set<storm::expressions::Variable> undefinedConstants;
 
             // TODO might need refactoring, this cannot be expressed by JANI yet, so this is totally wrong here.
-            boost::optional<std::shared_ptr<storm::logic::ShieldExpression const>> shieldingExpression;
+            boost::optional<std::shared_ptr<storm::logic::ShieldExpression const>> shieldingExpression = boost::none;
         };