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:
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 38109c3048e..41d69030e1a 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -640,7 +640,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
short matnr = mp->mat_nr;
int mf_smooth = mp->flag & ME_SMOOTH;
Material *mat = me->mat[matnr];
- int mode = mat->game.flag;
+ int mode = mat ? mat->game.flag : GEMAT_INVISIBLE;
if (!(mode & GEMAT_INVISIBLE) && (mode & GEMAT_TEXT) && mp->totloop >= 3) {
/* get the polygon as a tri/quad */