Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 29 Jun 2017 08:11:17 +0000 (10:11 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 29 Jun 2017 08:11:17 +0000 (10:11 +0200)
Conflicts:
source/blender/editors/space_outliner/outliner_select.c

1  2 
source/blender/blenkernel/intern/node.c
source/blender/editors/space_outliner/outliner_select.c

index 459af31b921cee529f6174d700a3f7ce8b153609,18cc2a015e6005b12f98dfa6bee01f7f1b19e1e8..d9590d2af7f823c8690a57fd501a6bc949d8ae39
@@@ -655,11 -703,16 +655,16 @@@ static eOLDrawState tree_element_active
  }
  
  static eOLDrawState tree_element_active_pose(
 -        bContext *C, Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *tselem, const eOLSetState set)
 +        bContext *C, Scene *scene, SceneLayer *sl, TreeElement *UNUSED(te), TreeStoreElem *tselem, const eOLSetState set)
  {
        Object *ob = (Object *)tselem->id;
 -      Base *base = BKE_scene_base_find(scene, ob);
 +      Base *base = BKE_scene_layer_base_find(sl, 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);