From 18f06186778ea67583a362a611b1efa8c9da5fbd Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sat, 1 Dec 2018 19:43:10 +0300 Subject: Fix T58412: in weight paint + pose mode certain armature operations crash. The cause is that FOREACH_OBJECT_IN_MODE_BEGIN assumed that the active object is in the correct mode, which is wrong in this case. It also only considered objects of the same type as active, which had to be replaced with an explicit type parameter. --- source/blender/editors/space_info/info_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_info') diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 2000618a4ad..e1823010e0d 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -412,7 +412,7 @@ static void stats_update(Depsgraph *depsgraph, ViewLayer *view_layer) if (obedit) { /* Edit Mode */ - FOREACH_OBJECT_IN_MODE_BEGIN(view_layer, ((View3D *)NULL), ob->mode, ob_iter) + FOREACH_OBJECT_IN_MODE_BEGIN(view_layer, ((View3D *)NULL), ob->type, ob->mode, ob_iter) { stats_object_edit(ob_iter, &stats); } -- cgit v1.2.3