From d6e7ea794d97e0525615939a935ea952c74b03e1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 17 Feb 2019 20:44:14 -0800 Subject: GLK: FROTZ: Fix erasing windows that don't have an associated GLK window --- engines/glk/frotz/processor_screen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/glk/frotz/processor_screen.cpp b/engines/glk/frotz/processor_screen.cpp index 2cc9080804..3f45b06c6b 100644 --- a/engines/glk/frotz/processor_screen.cpp +++ b/engines/glk/frotz/processor_screen.cpp @@ -213,7 +213,8 @@ void Processor::erase_window(zword win) { if (h_version == V6 && win != cwin && h_interpreter_number != INTERP_AMIGA) garglk_set_zcolors(_wp[win][TRUE_FG_COLOR], _wp[win][TRUE_BG_COLOR]); - glk_window_clear(_wp[win]); + if (_wp[win]) + glk_window_clear(_wp[win]); if (h_version == V6 && win != cwin && h_interpreter_number != INTERP_AMIGA) garglk_set_zcolors(_wp[cwin][TRUE_FG_COLOR], _wp[cwin][TRUE_BG_COLOR]); -- cgit v1.2.3