Fix #104992: Crash on calling operation search in outliner #105004

Merged
Pratik Borhade merged 1 commits from PratikPB2123/blender:T104992-outliner-crash into blender-v3.5-release 2023-02-25 18:36:36 +01:00
1 changed files with 5 additions and 0 deletions

View File

@ -3268,6 +3268,11 @@ static bool outliner_data_operation_poll(bContext *C)
}
const SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
const TreeElement *te = get_target_element(space_outliner);
if (te == nullptr) {
return false;
}
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
get_element_operation_type(te, &scenelevel, &objectlevel, &idlevel, &datalevel);
return ELEM(datalevel,