Merge pull request #51276 from lawnjelly/portals_set_active_editor_check

Portals - rooms_set_active needs Editor check
This commit is contained in:
Rémi Verschelde 2021-08-05 16:38:55 +02:00 committed by GitHub
commit c409e8268c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -510,7 +510,12 @@ void RoomManager::rooms_set_active(bool p_active) {
_active = p_active;
#ifdef TOOLS_ENABLED
SpatialEditor::get_singleton()->update_portal_tools();
if (Engine::get_singleton()->is_editor_hint()) {
SpatialEditor *spatial_editor = SpatialEditor::get_singleton();
if (spatial_editor) {
spatial_editor->update_portal_tools();
}
}
#endif
}
}