Browse Source

try to reload only when mc_deck is available

comment modified
pre-master-46
Holger Vogt 8 years ago
parent
commit
9cc690c55c
  1. 6
      src/frontend/inp.c

6
src/frontend/inp.c

@ -468,7 +468,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
/* called with *fp == NULL and not intfile: we want to reload circuit from mc_deck */
else {
/* re-load deck due to command 'reset' via function inp_source_recent() */
if (mc_reload) {
if (mc_reload && mc_deck) {
deck = inp_deckcopy(mc_deck);
expr_w_temper = TRUE;
mc_reload = FALSE;
@ -479,14 +479,14 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
deck = inp_deckcopy(ft_curckt->ci_mcdeck);
expr_w_temper = TRUE;
}
/* re-load input deck from the recent circuit structure */
/* re-load input deck from the recent circuit structure with mc_source */
else if (!ft_curckt && mc_deck) {
deck = inp_deckcopy(mc_deck);
expr_w_temper = TRUE;
}
/* no circuit available, should not happen */
else {
fprintf(stderr, "Error: No circuit loaded, cannot copy internally using mc_source\n");
fprintf(stderr, "Error: No circuit loaded, cannot copy internally using mc_source or reset\n");
controlled_exit(1);
}
/* print out the re-loaded deck into debug-out-mc.txt */

Loading…
Cancel
Save