[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33520] trunk/blender/source/blender/ editors/space_view3d/drawmesh.c: incorrect paranoid check for drawing texture face mode with no faces, it would crash in this case anyway.
Campbell Barton
ideasman42 at gmail.com
Tue Dec 7 02:30:14 CET 2010
Revision: 33520
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33520
Author: campbellbarton
Date: 2010-12-07 02:30:14 +0100 (Tue, 07 Dec 2010)
Log Message:
-----------
incorrect paranoid check for drawing texture face mode with no faces, it would crash in this case anyway.
instead check for faces from the caller.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/drawmesh.c
Modified: trunk/blender/source/blender/editors/space_view3d/drawmesh.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2010-12-07 00:48:36 UTC (rev 33519)
+++ trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2010-12-07 01:30:14 UTC (rev 33520)
@@ -526,10 +526,10 @@
{
Mesh *me = (Mesh*)userData;
MTFace *tface = (me->mtface)? &me->mtface[index]: NULL;
- MFace *mface = (me->mface)? &me->mface[index]: NULL;
+ MFace *mface = &me->mface[index];
MCol *mcol = (me->mcol)? &me->mcol[index]: NULL;
- int matnr = me->mface[index].mat_nr;
- if (mface && mface->flag&ME_HIDE) return 0;
+ const int matnr = mface->mat_nr;
+ if (mface->flag & ME_HIDE) return 0;
return draw_tface__set_draw(tface, mcol, matnr);
}
@@ -669,7 +669,7 @@
if(ob->mode & OB_MODE_WEIGHT_PAINT)
dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, me, 1, GPU_enable_material);
else
- dm->drawMappedFacesTex(dm, draw_tface_mapped__set_draw, me);
+ dm->drawMappedFacesTex(dm, me->mface ? draw_tface_mapped__set_draw : NULL, me);
}
else {
if( GPU_buffer_legacy(dm) )
More information about the Bf-blender-cvs
mailing list