[Bf-blender-cvs] [45272a1] soc-2013-paint: Fix crash when user removes a texture image from the material in texture paint mode

Antony Riakiotakis noreply at git.blender.org
Tue Apr 22 12:39:57 CEST 2014


Commit: 45272a19298f0120f330190a82b3bf4c4ceee2fd
Author: Antony Riakiotakis
Date:   Sun Apr 20 20:02:59 2014 +0300
https://developer.blender.org/rB45272a19298f0120f330190a82b3bf4c4ceee2fd

Fix crash when user removes a texture image from the material in texture
paint mode

===================================================================

M	source/blender/editors/space_view3d/drawmesh.c

===================================================================

diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 98cd302..c382177 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -274,7 +274,7 @@ static bool set_draw_settings_cached(int clearcache, MTFace *texface, Material *
 			alphablend = GPU_BLEND_ALPHA;
 	}
 	else if (texpaint && ma) {
-		ima = ma->texpaintslot->tex->ima;
+		ima = (ma->texpaintslot)? ma->texpaintslot->tex->ima : NULL;
 	}
 	else
 		textured = 0;




More information about the Bf-blender-cvs mailing list