1
0
Fork 0

Fix crash when removing SpinBox during text submit

This commit is contained in:
Aaron Franke 2023-06-01 20:49:39 -05:00
parent db5113de36
commit d3e4db4a7b
No known key found for this signature in database
GPG Key ID: 40A1750B977E56BF
1 changed files with 2 additions and 1 deletions

View File

@ -202,7 +202,8 @@ void SpinBox::_line_edit_focus_enter() {
void SpinBox::_line_edit_focus_exit() {
// Discontinue because the focus_exit was caused by left-clicking the arrows.
if (get_viewport()->gui_get_focus_owner() == get_line_edit()) {
Viewport *viewport = get_viewport();
if (!viewport || viewport->gui_get_focus_owner() == get_line_edit()) {
return;
}
// Discontinue because the focus_exit was caused by right-click context menu.