]> AND Private Git Repository - blast.git/blobdiff - BlockParameterGeneric.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
nearly finished GroupBlock VHDL gen
[blast.git] / BlockParameterGeneric.cpp
index b5b5186453d008df7309d6e33805fe878b95d442..d652c3740d90c18632128304320125a7effd1a3e 100644 (file)
@@ -69,13 +69,16 @@ QString BlockParameterGeneric::toVHDL(int context, int flags) {
       ret = formatNoValue.arg(name).arg(getTypeString());\r
     }\r
   }\r
-  else if (context == BlockParameter::Architecture) {\r
+  else if (context == BlockParameter::Instance) {\r
     QString format = "%1 => %2";\r
     if ((flags & BlockParameter::NoComma) == 0) {\r
       format.append(";");\r
     }\r
     AbstractBlock* parent = owner->getParent();\r
-    BlockParameter* p = parent->getParameterFromName(name);\r
+    BlockParameter* p = NULL;\r
+    if (parent != NULL) {\r
+      p = parent->getParameterFromName(name);\r
+    }\r
     if (p != NULL) {\r
       /* the parent group has a generic parameter with the same\r
            name\r