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.
This commit is contained in:
Julian Eisel
2023-08-10 15:27:25 +02:00
parent 255818a569
commit a995e16cd2

View File

@@ -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<ViewLayer *>(te->directdata);