Left out the case where MTFace can be null.
authorCharlie Carley <snailrose@gmail.com>
Mon, 5 Feb 2007 08:07:55 +0000 (08:07 +0000)
committerCharlie Carley <snailrose@gmail.com>
Mon, 5 Feb 2007 08:07:55 +0000 (08:07 +0000)
source/gameengine/Converter/BL_BlenderDataConversion.cpp

index ea5638a6009628b655085b6b8ec290d0156c24d9..a271ae145397bf5a862ee7a87093c3e0de249ad9 100644 (file)
@@ -679,7 +679,7 @@ BL_Material* ConvertMaterial(
        GetRGB(type,mface,mmcol,mat,rgb[0],rgb[1],rgb[2], rgb[3]);
 
        // swap the material color, so MCol on TF_BMFONT works
-       if (validmat && type==1 && tface->mode & TF_BMFONT)
+       if (validmat && type==1 && (tface && tface->mode & TF_BMFONT))
        {
                rgb[0] = KX_rgbaint2uint_new(rgb[0]);
                rgb[1] = KX_rgbaint2uint_new(rgb[1]);