Fixed crash in ScrollContainer
_notification
(cherry picked from commit ee81979f90
)
This commit is contained in:
parent
8fd0fe3d20
commit
62db47a7fb
1 changed files with 3 additions and 1 deletions
|
@ -257,7 +257,9 @@ void ScrollContainer::_notification(int p_what) {
|
|||
};
|
||||
|
||||
if (p_what == NOTIFICATION_READY) {
|
||||
get_viewport()->connect("gui_focus_changed", this, "_gui_focus_changed");
|
||||
Viewport *viewport = get_viewport();
|
||||
ERR_FAIL_COND(!viewport);
|
||||
viewport->connect("gui_focus_changed", this, "_gui_focus_changed");
|
||||
}
|
||||
|
||||
if (p_what == NOTIFICATION_SORT_CHILDREN) {
|
||||
|
|
Loading…
Reference in a new issue