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:
authorJeroen Bakker <jeroen@blender.org>2021-01-25 14:44:18 +0300
committerJeroen Bakker <jeroen@blender.org>2021-01-25 14:44:18 +0300
commit7a005fb7d172ba73936ad263aabd2ed7e4392688 (patch)
tree3f73ae8395c893c846c4a92c2b6cdd868195ede0 /source/blender/editors/space_node/drawnode.c
parentdd2b616320edaffb19f9e527bcf995e3dc2ebb5a (diff)
Fix T84324: Crash when combining two scenes in compositor.
In the CompositorOperation::deinitExecution the viewer could be freed at the same time it was drawn in the image editor or node editor. There is a guard for that but wasn't added during the migration of the two editors to the draw manager.
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r--source/blender/editors/space_node/drawnode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index df29950bc59..f2ee94af9b3 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -25,6 +25,7 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_system.h"
+#include "BLI_threads.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
@@ -3770,7 +3771,9 @@ void draw_nodespace_back_pix(const bContext *C,
/* The draw manager is used to draw the backdrop image. */
GPUFrameBuffer *old_fb = GPU_framebuffer_active_get();
GPU_framebuffer_restore();
+ BLI_thread_lock(LOCK_DRAW_IMAGE);
DRW_draw_view(C);
+ BLI_thread_unlock(LOCK_DRAW_IMAGE);
GPU_framebuffer_bind_no_srgb(old_fb);
/* Draw manager changes the depth state. Set it back to NONE. Without this the node preview
* images aren't drawn correctly. */