Fix combined pose + weight paint mode, was using wrong object
[blender-staging.git] / source / blender / editors / space_view3d / view3d_select.c
index b1fec793b09156ea305c20a3eb45c6be30bf73bd..a37e916064c25389ff43857a60693b04e91c6064 100644 (file)
@@ -1148,7 +1148,7 @@ static void mouse_select(bContext *C, short *mval, short extend, short obcenter,
                                        WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, basact->object);
                                        
                                        /* in weightpaint, we use selected bone to select vertexgroup, so no switch to new active object */
-                                       if(basact->object->mode & OB_MODE_WEIGHT_PAINT) {
+                                       if(BASACT && BASACT->object->mode & OB_MODE_WEIGHT_PAINT) {
                                                /* prevent activating */
                                                basact= NULL;
                                        }