guard against ft_curckt->ci_ckt == NULL
This commit is contained in:
parent
11b22c8f46
commit
d8085ed594
|
|
@ -18,7 +18,7 @@ com_option(wordlist *wl)
|
|||
|
||||
CKTcircuit *circuit = NULL;
|
||||
|
||||
if (!ft_curckt) {
|
||||
if (!ft_curckt || !ft_curckt->ci_ckt) {
|
||||
fprintf(cp_err, "Error: no circuit loaded\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ com_inventory(wordlist *wl)
|
|||
|
||||
NG_IGNORE(wl);
|
||||
|
||||
if (!ft_curckt) {
|
||||
if (!ft_curckt || !ft_curckt->ci_ckt) {
|
||||
fprintf(cp_err, "There is no current circuit\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ cp_usrset(struct variable *var, bool isset)
|
|||
return (0);
|
||||
}
|
||||
|
||||
if (ft_curckt) {
|
||||
if (ft_curckt && ft_curckt->ci_ckt) {
|
||||
if (if_option(ft_curckt->ci_ckt, var->va_name, var->va_type, vv))
|
||||
return US_SIMVAR;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue