Godot Engine – Multi-platform 2D and 3D game engine
Check if the rendering device singleton is null
Mattia Zirpoli207dbe480b95
diff --git a/servers/xr/xr_vrs.cpp b/servers/xr/xr_vrs.cppindex 561600ee9eb..6109622615c 100644--- a/servers/xr/xr_vrs.cpp+++ b/servers/xr/xr_vrs.cpp@@ -107,7 +107,10 @@ RID XRVRS::make_vrs_texture(const Size2 &p_target_size, const Vector<Vector2> &p#ifdef RD_ENABLEDERR_FAIL_COND_V(p_eye_foci.is_empty(), RID());- Size2i texel_size = RD::get_singleton()->vrs_get_texel_size();+ const RD *rd = RD::get_singleton();+ ERR_FAIL_NULL_V(rd, RID());++ Size2i texel_size = rd->vrs_get_texel_size();// Should return sensible data or graphics API does not support VRS.ERR_FAIL_COND_V(texel_size.x < 1 || texel_size.y < 1, RID());