svn merge ^/trunk/blender -r42564:42586
[blender-staging.git] / source / blender / editors / sculpt_paint / paint_vertex.c
index 04ae926ee068e55b34434df1c96030c8f21eb0fb..3109669602dfec73a59d97b75b499068903c0ea3 100644 (file)
@@ -1843,10 +1843,13 @@ static int set_wpaint(bContext *C, wmOperator *UNUSED(op))              /* toggle */
 /* for switching to/from mode */
 static int paint_poll_test(bContext *C)
 {
+       Object *ob= CTX_data_active_object(C);
        if(CTX_data_edit_object(C))
                return 0;
        if(CTX_data_active_object(C)==NULL)
                return 0;
+       if(!ob->data || ((ID *)ob->data)->lib)
+               return 0;
        return 1;
 }