odanoburu / rpms / wesnoth

Forked from rpms/wesnoth a year ago
Clone
Blob Blame History Raw
--- src/gui/widgets/text_box_base.cpp	2022-11-24 16:16:22.002103967 -0300
+++ src/gui/widgets/text_box_base.cpp	2022-11-24 16:16:39.702170887 -0300
@@ -316,7 +316,7 @@
 			cursor_alpha_ = 255;
 			return;
 		default:
-			if(get_window() != open_window_stack.back()) {
+			if(open_window_stack.size() != 0 && get_window() != open_window_stack.back()) {
 				cursor_alpha_ = 0;
 			} else {
 				cursor_alpha_ = (~cursor_alpha_) & 0xFF;