From 7bf5ab4b3c2cb527b8f71259da8601ae9df6e562 Mon Sep 17 00:00:00 2001 From: Andrii Nemchenko <62670490+andriyndev@users.noreply.github.com> Date: Mon, 19 Feb 2024 20:11:18 +0200 Subject: [PATCH] Call assert for listType before usage --- erpcgen/src/CGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpcgen/src/CGenerator.cpp b/erpcgen/src/CGenerator.cpp index 16b86311..6404cecd 100644 --- a/erpcgen/src/CGenerator.cpp +++ b/erpcgen/src/CGenerator.cpp @@ -305,8 +305,8 @@ DataType *CGenerator::findChildDataType(set &dataTypes, DataType *da { // The only child node of a list node is the element type. ListType *listType = dynamic_cast(dataType); - DataType *trueContainerDataType = listType->getTrueContainerDataType(); assert(listType); + DataType *trueContainerDataType = listType->getTrueContainerDataType(); DataType *elementType = findChildDataType(dataTypes, listType->getElementType()); listType->setElementType(elementType);