mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 21:31:10 +01:00
Fix crash when using Camera2D::set_custom_viewport()
This commit is contained in:
parent
b2f4c2ec10
commit
18d0362cc0
@ -584,6 +584,10 @@ void Camera2D::set_custom_viewport(Node *p_viewport) {
|
|||||||
remove_from_group(canvas_group_name);
|
remove_from_group(canvas_group_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (custom_viewport && !ObjectDB::get_instance(custom_viewport_id)) {
|
||||||
|
viewport = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
custom_viewport = Object::cast_to<Viewport>(p_viewport);
|
custom_viewport = Object::cast_to<Viewport>(p_viewport);
|
||||||
|
|
||||||
if (custom_viewport) {
|
if (custom_viewport) {
|
||||||
|
Loading…
Reference in New Issue
Block a user