From 53d07a8e462488891f248571fd27b00197790bf7 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Mon, 25 May 2020 13:04:29 +0100 Subject: Amiga: try to guard against page info window being destroyed twice --- frontends/amiga/pageinfo.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontends/amiga/pageinfo.c b/frontends/amiga/pageinfo.c index 8b79a0a23..d9802818a 100644 --- a/frontends/amiga/pageinfo.c +++ b/frontends/amiga/pageinfo.c @@ -67,9 +67,13 @@ ami_pageinfo_destroy(struct ami_corewindow *ami_cw) { nserror res; struct ami_pageinfo_window *pageinfo_win = (struct ami_pageinfo_window *)ami_cw; - res = page_info_destroy(pageinfo_win->pi); - if (res == NSERROR_OK) { - ami_corewindow_fini(&pageinfo_win->core); /* closes the window for us */ + if(pageinfo_win->pi != NULL) { + res = page_info_destroy(pageinfo_win->pi); + + if (res == NSERROR_OK) { + pageinfo_win->pi = NULL; + ami_corewindow_fini(&pageinfo_win->core); /* closes the window for us */ + } } } -- cgit v1.2.3