prevent crash if first breakpoint is beyond optran max time

This commit is contained in:
Holger Vogt 2020-06-06 00:55:35 +02:00
parent 6bdd6610f6
commit bca099ca29
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ CKTsetBreak(CKTcircuit *ckt, double time)
}
}
/* never found it - beyond end of time - extend out idea of time */
if(time-ckt->CKTbreaks[ckt->CKTbreakSize-1]<=ckt->CKTminBreak) {
if(ckt->CKTbreaks && time-ckt->CKTbreaks[ckt->CKTbreakSize-1]<=ckt->CKTminBreak) {
/* very close tegether - keep earlier, throw out new point */
#ifdef TRACE_BREAKPOINT
printf("[t:%e] \t %e skipped (at the end)\n", ckt->CKTtime, time);