[Bf-blender-cvs] [14863b3d4d8] master: Fix T86542: Crash going to UV editing workspace with an instancer that is hidden from the viewport
Philipp Oeser
noreply at git.blender.org
Mon Mar 15 12:49:27 CET 2021
Commit: 14863b3d4d86c7ad11de5268279ece31b12ee876
Author: Philipp Oeser
Date: Mon Mar 15 12:08:08 2021 +0100
Branches: master
https://developer.blender.org/rB14863b3d4d86c7ad11de5268279ece31b12ee876
Fix T86542: Crash going to UV editing workspace with an instancer that
is hidden from the viewport
Check visibilty (as done in workbench_cache_populate) in
overlay_edit_uv_cache_populate as well.
Maniphest Tasks: T86542
Differential Revision: https://developer.blender.org/D10724
===================================================================
M source/blender/draw/engines/overlay/overlay_edit_uv.c
===================================================================
diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.c b/source/blender/draw/engines/overlay/overlay_edit_uv.c
index fe0741d1606..9c58a2b574f 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_uv.c
+++ b/source/blender/draw/engines/overlay/overlay_edit_uv.c
@@ -28,6 +28,7 @@
#include "BKE_image.h"
#include "BKE_layer.h"
#include "BKE_mask.h"
+#include "BKE_object.h"
#include "BKE_paint.h"
#include "DNA_brush_types.h"
@@ -417,6 +418,10 @@ void OVERLAY_edit_uv_cache_init(OVERLAY_Data *vedata)
static void overlay_edit_uv_cache_populate(OVERLAY_Data *vedata, Object *ob)
{
+ if (!(DRW_object_visibility_in_active_context(ob) & OB_VISIBLE_SELF)) {
+ return;
+ }
+
OVERLAY_StorageList *stl = vedata->stl;
OVERLAY_PrivateData *pd = stl->pd;
GPUBatch *geom;
More information about the Bf-blender-cvs
mailing list