From a995e16cd2def59ebda5d0204bed1e5050b464f1 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 10 Aug 2023 15:27:25 +0200 Subject: [PATCH] Fix incorrect type cast of Outliner view layer element data The view layer "base" element (the parent that the individual layers are nested in) does not point to any data in its `directdata`, definitely not to a view layer. Don't cast it to one, this can cause undefined behavior when the pointer is not null. --- source/blender/editors/space_outliner/outliner_select.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc index 26ed3e5d1a3..c3935792554 100644 --- a/source/blender/editors/space_outliner/outliner_select.cc +++ b/source/blender/editors/space_outliner/outliner_select.cc @@ -1345,7 +1345,6 @@ static void outliner_set_properties_tab(bContext *C, TreeElement *te, TreeStoreE context = BCONTEXT_DATA; break; } - case TSE_R_LAYER_BASE: case TSE_R_LAYER: { ViewLayer *view_layer = static_cast(te->directdata);