Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-08-22 04:54:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-08-22 04:54:22 +0400
commit93fc6cb680dfc3e53aa5810cbe4661263cd13d9a (patch)
treef0506bc6503c9d7d91a046e8feb464a29001f570
parent2d428a406112fc3b1c03540db679910236c526e8 (diff)
missing NULL check when game text meshes had no vertex colors
-rw-r--r--source/blender/src/drawmesh.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c
index df224585538..d9ebd175dec 100644
--- a/source/blender/src/drawmesh.c
+++ b/source/blender/src/drawmesh.c
@@ -484,7 +484,7 @@ void draw_mesh_text(Object *ob, int glsl)
ddm = mesh_get_derived_deform(ob, CD_MASK_BAREMESH);
- for(a=0, mf=mface; a<totface; a++, tface++, mcol+=4, mf++) {
+ for(a=0, mf=mface; a<totface; a++, tface++, mf++) {
int mode= tface->mode;
int matnr= mf->mat_nr;
int mf_smooth= mf->flag & ME_SMOOTH;
@@ -506,8 +506,10 @@ void draw_mesh_text(Object *ob, int glsl)
}
else {
badtex = set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE);
- if (badtex)
+ if (badtex) {
+ mcol+=4;
continue;
+ }
}
ddm->getVertCo(ddm, mf->v1, v1);
@@ -535,6 +537,9 @@ void draw_mesh_text(Object *ob, int glsl)
GPU_render_text(tface, tface->mode, string, characters,
(unsigned int*)mcol, v1, v2, v3, (mf->v4? v4: NULL), glattrib);
}
+ if (mcol) {
+ mcol+=4;
+ }
}
ddm->release(ddm);