diff options
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tools.cc')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 475d02020d0..5c7b0732beb 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -229,6 +229,12 @@ static void unlink_material_fn(bContext *UNUSED(C), TreeStoreElem *UNUSED(tselem), void *UNUSED(user_data)) { + if (!tsep || !TSE_IS_REAL_ID(tsep)) { + /* Valid case, no parent element of the material or it is not an ID (could be a #TSE_ID_BASE + * for example) so there's no data to unlink from. */ + return; + } + Material **matar = nullptr; int a, totcol = 0; |