Fix combined pose + weight paint mode, was using wrong object
[blender-staging.git] / source / blender / editors / armature / editarmature.c
index 394df8111d8918ef5f2a9d9fc8e98899f5ac69ee..80f8c2b07aa739542ad8c87035d0781abcb2ff61 100644 (file)
@@ -4333,7 +4333,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
                }
                
                /* in weightpaint we select the associated vertex group too */
-               if (ob->mode & OB_MODE_WEIGHT_PAINT) {
+               if (OBACT && OBACT->mode & OB_MODE_WEIGHT_PAINT) {
                        if (nearBone->flag & BONE_ACTIVE) {
                                ED_vgroup_select_by_name(OBACT, nearBone->name);
                                DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);