Skip to content

Commit

Permalink
fix crash when indexing empty open_window_stack
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Jul 17, 2020
1 parent 4ec9852 commit fe0f5b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/widgets/text_box_base.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit fe0f5b8

Please sign in to comment.