2.5/Paint:
[blender.git] / source / blender / editors / space_buttons / buttons_context.c
index d438490ff7e47b4e188045800c50334c73375dec..a1e1c589449cb0edbd8c4eb6e82d5654f1cb30d7 100644 (file)
@@ -325,7 +325,7 @@ static int buttons_context_path_brush(const bContext *C, ButsContextPath *path)
                        br= ts->sculpt->brush;
                else if(obact && obact->mode & OB_MODE_VERTEX_PAINT)
                        br= ts->vpaint->brush;
-               else if(G.f & G_WEIGHTPAINT)
+               else if(obact && obact->mode & OB_MODE_WEIGHT_PAINT)
                        br= ts->wpaint->brush;
                else if(G.f & G_TEXTUREPAINT)
                        br= ts->imapaint.brush;