From 37b9d88c7e63514f3ecc344f712e7f52395be833 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Apr 2025 15:43:03 +0200 Subject: [PATCH] fixed bug when having multiple smvControls --- .../ModelGenerator/ModelGenerator/src/C_Structures.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/C_Structures.cs b/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/C_Structures.cs index 146f84ab..b575e74d 100644 --- a/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/C_Structures.cs +++ b/tools/model_generator_dotnet/ModelGenerator/ModelGenerator/src/C_Structures.cs @@ -776,7 +776,14 @@ namespace ModelGenerator.C_Structures else cText += " NULL,\n"; - cText += " " + SMVControl.SclSMVControl.SclSmvOpts.GetIntValue() + ",\n"; + if (SMVControl.SclSMVControl.SclSmvOpts != null) + { + cText += " " + SMVControl.SclSMVControl.SclSmvOpts.GetIntValue() + ",\n"; + } + else + { + cText += " 0,\n"; + } if (SMVControl.SclSMVControl.SmpMod != null) cText += " " + SMVControl.SclSMVControl.SmpMod + ",\n";