safety measure against here->conn[i]->port[j]->partial etc.

being NULL
This commit is contained in:
Holger Vogt 2018-08-27 12:47:56 +02:00
parent f988dfad93
commit 21edfb2127
1 changed files with 6 additions and 3 deletions

View File

@ -515,9 +515,12 @@ MIFunsetup(GENmodel *inModel,CKTcircuit *ckt)
for (k = 0; k < num_conn; k++) {
if ((here->conn[k]->is_null) || (!here->conn[k]->is_input))
continue;
tfree(here->conn[i]->port[j]->partial[k].port);
tfree(here->conn[i]->port[j]->ac_gain[k].port);
tfree(here->conn[i]->port[j]->smp_data.input[k].port);
if (here->conn[i]->port[j]->partial)
tfree(here->conn[i]->port[j]->partial[k].port);
if (here->conn[i]->port[j]->ac_gain)
tfree(here->conn[i]->port[j]->ac_gain[k].port);
if (here->conn[i]->port[j]->smp_data.input)
tfree(here->conn[i]->port[j]->smp_data.input[k].port);
}
tfree(here->conn[i]->port[j]->partial);
tfree(here->conn[i]->port[j]->ac_gain);