aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/ops
diff options
context:
space:
mode:
Diffstat (limited to 'reference_model/src/ops')
-rw-r--r--reference_model/src/ops/control_flow.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/reference_model/src/ops/control_flow.cc b/reference_model/src/ops/control_flow.cc
index 03ad6c6..a0e1fc2 100644
--- a/reference_model/src/ops/control_flow.cc
+++ b/reference_model/src/ops/control_flow.cc
@@ -172,6 +172,8 @@ OpCondIf::~OpCondIf()
int OpCondIf::checkTensorAttributes()
{
+ ERROR_IF(!tsh, "OpCondIf: tosa serialization handler must not be null");
+
ERROR_IF(getInputs().size() < 1, "OpCondIf: must have at least 1 operand");
ERROR_IF(inputs[0]->getDtype() != TOSA_REF_TYPE_BOOL || inputs[0]->getRank() != 0,
@@ -309,6 +311,11 @@ OpWhileLoop::~OpWhileLoop()
int OpWhileLoop::checkTensorAttributes()
{
+ if (!tsh) {
+ WARNING("OpWhileLoop: tosa serialization handler must not be null");
+ return 1;
+ }
+
if (getInputs().size() <= 0)
{
WARNING("OpWhileLoop: must have at least 1 operands");