Merge pull request #89099 from chrisl8/no_custom_cursor_error_in_headless

Do not attempt to set cursor shape in headless mode.
This commit is contained in:
Rémi Verschelde 2024-03-04 13:34:09 +01:00
commit 2d4c923307
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -6191,7 +6191,9 @@ EditorNode::EditorNode() {
// Only if no touchscreen ui hint, disable emulation just in case.
Input::get_singleton()->set_emulate_touch_from_mouse(false);
}
DisplayServer::get_singleton()->cursor_set_custom_image(Ref<Resource>());
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CUSTOM_CURSOR_SHAPE)) {
DisplayServer::get_singleton()->cursor_set_custom_image(Ref<Resource>());
}
}
SceneState::set_disable_placeholders(true);