evtprint.c: no node data: error message instead of seg fault

This commit is contained in:
h_vogt 2012-07-30 23:32:54 +02:00
parent c0b5a78097
commit 207adefcda
1 changed files with 6 additions and 1 deletions

View File

@ -158,7 +158,12 @@ void EVTprint(
return;
}
udn_index[i] = node_table[node_index[i]]->udn_index;
node_data[i] = ckt->evt->data.node->head[node_index[i]];
if (ckt->evt->data.node)
node_data[i] = ckt->evt->data.node->head[node_index[i]];
else {
printf("ERROR - No node data: simulation not yet run?\n");
return;
}
node_value[i] = "";
w = w->wl_next;
}