svn merge -r 15392:15551 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / gameengine / Ketsji / KX_MeshProxy.cpp
index 5c8fef1fca09cb10ea3f65ed2ef006e6f66e78c2..c7a251751cd042c7e9a62119fcda8a4340e1f5f3 100644 (file)
@@ -157,6 +157,9 @@ PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* self,
        {
                matname = m_meshobj->GetMaterialName(matid);
        }
+       else {
+               return NULL;
+       }
 
        return PyString_FromString(matname.Ptr());
                
@@ -174,6 +177,9 @@ PyObject* KX_MeshProxy::PyGetTextureName(PyObject* self,
        {
                matname = m_meshobj->GetTextureName(matid);
        }
+       else {
+               return NULL;
+       }
 
        return PyString_FromString(matname.Ptr());
                
@@ -195,6 +201,9 @@ PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* self,
                        length = m_meshobj->GetVertexArrayLength(mat);
                }
        }
+       else {
+               return NULL;
+       }
 
        return PyInt_FromLong(length);
                
@@ -217,6 +226,9 @@ PyObject* KX_MeshProxy::PyGetVertex(PyObject* self,
                        vertexob = new KX_VertexProxy(this, vertex);
                }
        }
+       else {
+               return NULL;
+       }
 
        return vertexob;