Fix T51926: Selecting pose icon under expanded group in outliner causes crash.

Cannot switch uninstantiated armature to Pose mode...
This commit is contained in:
Bastien Montagne 2017-06-29 10:09:17 +02:00
parent 1f3fd8e60a
commit a57a7975a1
Notes: blender-bot 2023-02-14 11:34:30 +01:00
Referenced by issue #51926, Selecting pose icon under expanded group in outliner causes crash
1 changed files with 6 additions and 1 deletions

View File

@ -707,7 +707,12 @@ static eOLDrawState tree_element_active_pose(
{
Object *ob = (Object *)tselem->id;
Base *base = BKE_scene_base_find(scene, ob);
if (base == NULL) {
/* Armature not instantiated in current scene (e.g. inside an appended group...). */
return OL_DRAWSEL_NONE;
}
if (set != OL_SETSEL_NONE) {
if (scene->obedit)
ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);