verify pointer before utilization
This commit is contained in:
parent
42d29ef49f
commit
cc4e4d9bad
|
|
@ -815,8 +815,10 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
|||
/* now load deck into ft_curckt -- the current circuit. */
|
||||
inp_dodeck(deck, tt, wl_first, FALSE, options, filename);
|
||||
|
||||
ft_curckt->devtlist = devtlist;
|
||||
ft_curckt->modtlist = modtlist;
|
||||
if (ft_curckt) {
|
||||
ft_curckt->devtlist = devtlist;
|
||||
ft_curckt->modtlist = modtlist;
|
||||
}
|
||||
|
||||
/* inp_dodeck did take ownership */
|
||||
tt = NULL;
|
||||
|
|
|
|||
|
|
@ -1058,7 +1058,8 @@ X11_Input(REQUEST *request, RESPONSE *response)
|
|||
|
||||
default:
|
||||
internalerror("unrecognized input type");
|
||||
response->option = error_option;
|
||||
if (response)
|
||||
response->option = error_option;
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -342,7 +342,8 @@ dosim(
|
|||
if (rawfileFp) {
|
||||
if (ftell(rawfileFp) == 0) {
|
||||
(void) fclose(rawfileFp);
|
||||
(void) unlink(wl->wl_word);
|
||||
if (wl)
|
||||
(void) unlink(wl->wl_word);
|
||||
} else {
|
||||
(void) fclose(rawfileFp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue