From fe0f5b8121523edf3c09bf2b8591b83242962501 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Fri, 17 Jul 2020 13:36:26 +0200 Subject: [PATCH] fix crash when indexing empty open_window_stack --- src/gui/widgets/text_box_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/text_box_base.cpp b/src/gui/widgets/text_box_base.cpp index ef7f8557b270..a7622fe7a234 100644 --- a/src/gui/widgets/text_box_base.cpp +++ b/src/gui/widgets/text_box_base.cpp @@ -311,7 +311,7 @@ void text_box_base::cursor_timer_callback() cursor_alpha_ = 255; return; default: - if(get_window() != open_window_stack.back()) { + if(!open_window_stack.empty() && get_window() != open_window_stack.back()) { cursor_alpha_ = 0; } else { cursor_alpha_ = (~cursor_alpha_) & 0xFF;