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:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-11-01 23:18:15 +0300
committerBenoit Bolsee <benoit.bolsee@online.be>2008-11-01 23:18:15 +0300
commite72d6c7bfaee29c0a1c360237299484ca5caaeb7 (patch)
tree0f8dde194a79d27ac657c15d77a80841f84cfb45 /source/gameengine/VideoTexture/Texture.cpp
parentb24c6ef70d4c6aa5b4e8539362eaa826b86343e2 (diff)
VideoTexture: fix NULL pointer crash when material name is not found.
Diffstat (limited to 'source/gameengine/VideoTexture/Texture.cpp')
-rw-r--r--source/gameengine/VideoTexture/Texture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/VideoTexture/Texture.cpp b/source/gameengine/VideoTexture/Texture.cpp
index 243c5f31db0..ea3f60b2775 100644
--- a/source/gameengine/VideoTexture/Texture.cpp
+++ b/source/gameengine/VideoTexture/Texture.cpp
@@ -96,7 +96,7 @@ RAS_IPolyMaterial * getMaterial (PyObject *obj, short matID)
// get material from mesh
RAS_MeshObject * mesh = gameObj->GetMesh(0);
RAS_MeshMaterial *meshMat = mesh->GetMeshMaterial(matID);
- if (meshMat->m_bucket != NULL)
+ if (meshMat != NULL && meshMat->m_bucket != NULL)
// return pointer to polygon or blender material
return meshMat->m_bucket->GetPolyMaterial();
}