Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-09-27 01:53:50 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-09-27 01:53:56 +0300
commit722b850c38378175d08722d61352ee6a4b8faf42 (patch)
tree680f15711afd0b870230ff249e8c5572774c4be9 /source/blender
parent408a8edf89dc4d2601e39bf5316aecd5643c185c (diff)
GPU: Fix crash when rendering with compositor using CLI
The backend gets used before it is initialized again. This is just a workaround for now as production schedule needs ir.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_context.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc
index 92cbbc5b4b0..48d7b2019c5 100644
--- a/source/blender/gpu/intern/gpu_context.cc
+++ b/source/blender/gpu/intern/gpu_context.cc
@@ -195,7 +195,11 @@ void GPU_render_begin()
{
GPUBackend *backend = GPUBackend::get();
BLI_assert(backend);
- backend->render_begin();
+ /* WORKAROUND: Currently a band-aid for the heist production. Has no side effect for GL backend
+ * but should be fixed for Metal. */
+ if (backend) {
+ backend->render_begin();
+ }
}
void GPU_render_end()
{