[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13897] trunk/blender/source/blender/src/ booleanops.c: Bugfix: NewBooleanMesh() would return 'internal error' no matter what happened - real return values must have been lost on the way .
Daniel Genrich
daniel.genrich at gmx.net
Wed Feb 27 21:17:03 CET 2008
Revision: 13897
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13897
Author: genscher
Date: 2008-02-27 21:17:03 +0100 (Wed, 27 Feb 2008)
Log Message:
-----------
Bugfix: NewBooleanMesh() would return 'internal error' no matter what happened - real return values must have been lost on the way. I put the proper return in it's place. (reported by cptf on IRC)
Modified Paths:
--------------
trunk/blender/source/blender/src/booleanops.c
Modified: trunk/blender/source/blender/src/booleanops.c
===================================================================
--- trunk/blender/source/blender/src/booleanops.c 2008-02-27 20:10:05 UTC (rev 13896)
+++ trunk/blender/source/blender/src/booleanops.c 2008-02-27 20:17:03 UTC (rev 13897)
@@ -532,6 +532,13 @@
maxmat= ob->totcol + ob_select->totcol;
mat= (Material**)MEM_mallocN(sizeof(Material*)*maxmat, "NewBooleanMeshMat");
+ /* put some checks in for nice user feedback */
+ if((!(get_mesh(ob)->totface)) || (!(get_mesh(ob_select)->totface)))
+ {
+ MEM_freeN(mat);
+ return -1;
+ }
+
dm= NewBooleanDerivedMesh_intern(ob, ob_select, int_op_type, mat, &totmat);
if (dm == NULL) {
More information about the Bf-blender-cvs
mailing list