2.5/Vertex paint:
[blender.git] / source / blender / editors / space_buttons / buttons_context.c
index 0be151a11b663a5ea3af97c61b8af2eebed371e4..d438490ff7e47b4e188045800c50334c73375dec 100644 (file)
@@ -323,7 +323,7 @@ static int buttons_context_path_brush(const bContext *C, ButsContextPath *path)
 
                if(obact && obact->mode & OB_MODE_SCULPT)
                        br= ts->sculpt->brush;
-               else if(G.f & G_VERTEXPAINT)
+               else if(obact && obact->mode & OB_MODE_VERTEX_PAINT)
                        br= ts->vpaint->brush;
                else if(G.f & G_WEIGHTPAINT)
                        br= ts->wpaint->brush;