From c485bcd8a2ffaa83e07e7eaebb078de4a4fde569 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 19 Apr 2024 19:12:23 +0200 Subject: [PATCH] preview_window() : BUG: fix order of statements --- src/xinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xinit.c b/src/xinit.c index 7d32b4f5..ed8872a4 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -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_, ¤t_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--; } }