diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-09-29 16:59:46 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-09-29 17:24:53 +0800 |
commit | 82f7f2c46c023629042d16ada5d5085bd29bb9ad (patch) | |
tree | 70a650b015c6425b200e8ab5bfa24836f465abb9 /servers/rendering | |
parent | ad635567b1964c3e573dedd158cf9dab09364fec (diff) |
Fix crash in headless mode
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/rendering_server_default.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/rendering/rendering_server_default.cpp b/servers/rendering/rendering_server_default.cpp index bed6ade1f6..62390f9d4d 100644 --- a/servers/rendering/rendering_server_default.cpp +++ b/servers/rendering/rendering_server_default.cpp @@ -45,6 +45,9 @@ int RenderingServerDefault::changes = 0; /* FREE */ void RenderingServerDefault::_free(RID p_rid) { + if (unlikely(p_rid.is_null())) { + return; + } if (RSG::storage->free(p_rid)) { return; } |