diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-09-27 01:53:50 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-09-27 01:53:56 +0300 |
commit | 722b850c38378175d08722d61352ee6a4b8faf42 (patch) | |
tree | 680f15711afd0b870230ff249e8c5572774c4be9 /source/blender/gpu/intern | |
parent | 408a8edf89dc4d2601e39bf5316aecd5643c185c (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/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_context.cc | 6 |
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() { |