diff options
author | dzil123 <5725958+dzil123@users.noreply.github.com> | 2022-11-19 03:22:27 -0800 |
---|---|---|
committer | dzil123 <5725958+dzil123@users.noreply.github.com> | 2022-11-19 16:31:05 -0800 |
commit | 9ce9c959abb993b1c4edf242ff56ed5f568db791 (patch) | |
tree | 063a288432f6787d55dd47c76ae2996913ce26a1 /servers | |
parent | 84c404f6bcce9ba112118d77afd6bd70a92774d1 (diff) |
RenderingServer::create_local_rendering_device null check and docs
Co-authored-by: Clay John <claynjohn@gmail.com>
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering_server.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index a18a9d7460..6cb1684baf 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -1476,7 +1476,11 @@ RenderingDevice *RenderingServer::get_rendering_device() const { } RenderingDevice *RenderingServer::create_local_rendering_device() const { - return RenderingDevice::get_singleton()->create_local_device(); + RenderingDevice *device = RenderingDevice::get_singleton(); + if (!device) { + return nullptr; + } + return device->create_local_device(); } static Vector<Ref<Image>> _get_imgvec(const TypedArray<Image> &p_layers) { |