[Bf-blender-cvs] [c013280] master: Fix mistake in BKE_mesh_new_from_object handling of materials in MetaBall case.

Bastien Montagne noreply at git.blender.org
Mon Oct 24 10:07:12 CEST 2016


Commit: c013280eec2fa1e5431b3346fa342e9681b1c1a3
Author: Bastien Montagne
Date:   Mon Oct 24 10:06:00 2016 +0200
Branches: master
https://developer.blender.org/rBc013280eec2fa1e5431b3346fa342e9681b1c1a3

Fix mistake in BKE_mesh_new_from_object handling of materials in MetaBall case.

Typo, spoted by Coverity scan.

To be backported to 2.78a.

===================================================================

M	source/blender/blenkernel/intern/mesh.c

===================================================================

diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 446aef9..d21f43a 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -2389,7 +2389,7 @@ Mesh *BKE_mesh_new_from_object(
 					/* are we an object material or data based? */
 					tmpmesh->mat[i] = give_current_material(ob, i + 1);
 
-					if (((ob->matbits[i] && ob->matbits) || do_mat_id_data_us) && tmpmesh->mat[i]) {
+					if (((ob->matbits && ob->matbits[i]) || do_mat_id_data_us) && tmpmesh->mat[i]) {
 						id_us_plus(&tmpmesh->mat[i]->id);
 					}
 				}




More information about the Bf-blender-cvs mailing list