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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user