mirror of
https://github.com/godotengine/godot.git
synced 2025-02-01 14:45:22 +00:00
Fixed crash in ScrollContainer
_notification
This commit is contained in:
parent
11efbd582e
commit
ee81979f90
@ -320,7 +320,9 @@ void ScrollContainer::_notification(int p_what) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_READY) {
|
if (p_what == NOTIFICATION_READY) {
|
||||||
get_viewport()->connect("gui_focus_changed", callable_mp(this, &ScrollContainer::_gui_focus_changed));
|
Viewport* viewport = get_viewport();
|
||||||
|
ERR_FAIL_COND(!viewport);
|
||||||
|
viewport->connect("gui_focus_changed", callable_mp(this, &ScrollContainer::_gui_focus_changed));
|
||||||
_update_dimensions();
|
_update_dimensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user