[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40379] trunk/blender/source/blender/ editors/space_view3d/drawmesh.c: fix possible crasg in recent texface commit - material pointer could be used un-inirialized .
Campbell Barton
ideasman42 at gmail.com
Tue Sep 20 06:45:01 CEST 2011
Revision: 40379
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40379
Author: campbellbarton
Date: 2011-09-20 04:45:01 +0000 (Tue, 20 Sep 2011)
Log Message:
-----------
fix possible crasg in recent texface commit - material pointer could be used un-inirialized.
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 2011-09-20 04:38:59 UTC (rev 40378)
+++ trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2011-09-20 04:45:01 UTC (rev 40379)
@@ -518,15 +518,14 @@
static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmooth_r)
{
Mesh *me = (Mesh*)userData;
- Material *ma;
if (me->mface) {
- int matnr = me->mface[index].mat_nr;
- ma = me->mat[matnr];
- }
+ short matnr= me->mface[index].mat_nr;
+ Material *ma= me->mat[matnr];
- if ( ma && (ma->game.flag & GEMAT_INVISIBLE)) {
- return 0;
+ if (ma && (ma->game.flag & GEMAT_INVISIBLE)) {
+ return 0;
+ }
}
*drawSmooth_r = 1;
More information about the Bf-blender-cvs
mailing list