1
0
Fork 0

Add error condition for Control EXIT_TREE notif

This commit is contained in:
Lenny Critchley 2021-10-28 00:26:57 +01:00
parent 23955fc282
commit 3d1249a520
No known key found for this signature in database
GPG Key ID: 986A3CBB5AE9D556
1 changed files with 2 additions and 0 deletions

View File

@ -471,6 +471,8 @@ void Control::_notification(int p_notification) {
_size_changed();
} break;
case NOTIFICATION_EXIT_TREE: {
ERR_FAIL_COND(!get_viewport());
get_viewport()->_gui_remove_control(this);
} break;