Fix #144840: Crash unlinking object from outliner unused data mode
When unlinking object from unused data display mode, crash occurred due to dangling pointer (`id->lib->runtime`) of parent tree element. Here parent is "Objects" tree element which is not an actual ID. Similar to other unlink callback, add an extra check to ensure we're unlinking from valid ID/tree element. Pull Request: https://projects.blender.org/blender/blender/pulls/144853
This commit is contained in:
committed by
Pratik Borhade
parent
5681d41ca5
commit
e196384a68
@@ -437,6 +437,10 @@ static void unlink_object_fn(bContext *C,
|
||||
TreeStoreElem *tselem)
|
||||
{
|
||||
if (tsep && tsep->id) {
|
||||
|
||||
if (!TSE_IS_REAL_ID(tsep)) {
|
||||
return;
|
||||
}
|
||||
Main *bmain = CTX_data_main(C);
|
||||
Object *ob = (Object *)tselem->id;
|
||||
const eSpaceOutliner_Mode outliner_mode = eSpaceOutliner_Mode(
|
||||
|
||||
Reference in New Issue
Block a user