preview_window() : BUG: fix order of statements

This commit is contained in:
stefan schippers 2024-04-19 19:12:23 +02:00
parent 34a06d964d
commit c485bcd8a2
1 changed files with 1 additions and 1 deletions

View File

@ -1262,7 +1262,6 @@ int preview_window(const char *what, const char *win_path, const char *fname)
preview_xctx[i] = NULL;
}
my_free(_ALLOC_ID_, &current_file[i]);
tkpre_window[i] = NULL;
xctx = save_xctx; /* restore schematic */
save_xctx = NULL;
set_modify(-1);
@ -1270,6 +1269,7 @@ int preview_window(const char *what, const char *win_path, const char *fname)
if(!strcmp(what, "destroy")) {
Tk_DestroyWindow(tkpre_window[i]);
}
tkpre_window[i] = NULL;
last_preview--;
}
}