preview_window() : BUG 2: test for NULL tkpre_window[i]

This commit is contained in:
stefan schippers 2024-04-19 19:17:18 +02:00
parent c485bcd8a2
commit b525252612
1 changed files with 1 additions and 1 deletions

View File

@ -1218,7 +1218,7 @@ int preview_window(const char *what, const char *win_path, const char *fname)
int i;
dbg(1, "preview_window() draw\n");
for(i = 0; i < 10; i++) {
if(Tk_NameToWindow(interp, win_path, mainwindow) == tkpre_window[i]) break;
if(Tk_NameToWindow(interp, win_path, mainwindow) == tkpre_window[i] && tkpre_window[i]) break;
}
if(i < 10) {
save_xctx = xctx; /* save current schematic */