X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/6e2b3026c6a496e81642c373796bd39dad33d2a6..8f0bedf735fe2b306c11c3f4a168245a05e37ccd:/BlockParameterGeneric.cpp diff --git a/BlockParameterGeneric.cpp b/BlockParameterGeneric.cpp index b5b5186..d652c37 100644 --- a/BlockParameterGeneric.cpp +++ b/BlockParameterGeneric.cpp @@ -69,13 +69,16 @@ QString BlockParameterGeneric::toVHDL(int context, int flags) { ret = formatNoValue.arg(name).arg(getTypeString()); } } - else if (context == BlockParameter::Architecture) { + else if (context == BlockParameter::Instance) { QString format = "%1 => %2"; if ((flags & BlockParameter::NoComma) == 0) { format.append(";"); } AbstractBlock* parent = owner->getParent(); - BlockParameter* p = parent->getParameterFromName(name); + BlockParameter* p = NULL; + if (parent != NULL) { + p = parent->getParameterFromName(name); + } if (p != NULL) { /* the parent group has a generic parameter with the same name