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:
authorCampbell Barton <ideasman42@gmail.com>2009-07-25 23:34:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-25 23:34:38 +0400
commit88097e99099b8bea9c9e435d7c728afaa8bc24ff (patch)
tree4e13f1483141d020b8e02ad6ed91502e0c153d38
parent431a388ae72bc21eff47ed616913e30920a2ce47 (diff)
- BGE Python API converting a mesh from a python arg was broken but happened to work if the uninitialized pointer was not NULL.
- iris.c - looks like a copy/paste error, was using rect where it could not have been initialized.
-rw-r--r--source/blender/imbuf/intern/iris.c4
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index eba148cb8a5..7b8c383ddb9 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -245,7 +245,6 @@ struct ImBuf *imb_loadiris(unsigned char *mem, int flags)
int xsize, ysize, zsize;
int bpp, rle, cur, badorder;
ImBuf * ibuf;
- uchar * rect;
/*printf("new iris\n");*/
@@ -436,6 +435,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, int flags)
if (bpp == 1) {
+ uchar * rect;
if (image.zsize == 1){
rect = (uchar *) ibuf->rect;
@@ -467,7 +467,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, int flags)
fbase = ibuf->rect_float;
for (x = ibuf->x * ibuf->y; x > 0; x--) {
fbase[0] = 1;
- fbase[1] = rect[2] = rect[3];
+ fbase[1] = fbase[2] = fbase[3];
fbase += 4;
}
} else if (image.zsize == 2){
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp
index 11effa1ca98..ee5813ad854 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.cpp
+++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp
@@ -347,7 +347,7 @@ bool ConvertPythonToMesh(PyObject * value, RAS_MeshObject **object, bool py_none
KX_MeshProxy *kx_mesh = static_cast<KX_MeshProxy*>BGE_PROXY_REF(value);
/* sets the error */
- if (*object==NULL) {
+ if (kx_mesh==NULL) {
PyErr_Format(PyExc_SystemError, "%s, " BGE_PROXY_ERROR_MSG, error_prefix);
return false;
}