[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21895] trunk/blender/source: - BGE Python API converting a mesh from a python arg was broken but happened to work if the uninitialized pointer was not NULL .
Campbell Barton
ideasman42 at gmail.com
Sat Jul 25 21:34:38 CEST 2009
Revision: 21895
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21895
Author: campbellbarton
Date: 2009-07-25 21:34:38 +0200 (Sat, 25 Jul 2009)
Log Message:
-----------
- 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.
Modified Paths:
--------------
trunk/blender/source/blender/imbuf/intern/iris.c
trunk/blender/source/gameengine/Ketsji/KX_MeshProxy.cpp
Modified: trunk/blender/source/blender/imbuf/intern/iris.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/iris.c 2009-07-25 19:18:09 UTC (rev 21894)
+++ trunk/blender/source/blender/imbuf/intern/iris.c 2009-07-25 19:34:38 UTC (rev 21895)
@@ -245,7 +245,6 @@
int xsize, ysize, zsize;
int bpp, rle, cur, badorder;
ImBuf * ibuf;
- uchar * rect;
/*printf("new iris\n");*/
@@ -436,6 +435,7 @@
if (bpp == 1) {
+ uchar * rect;
if (image.zsize == 1){
rect = (uchar *) ibuf->rect;
@@ -467,7 +467,7 @@
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){
Modified: trunk/blender/source/gameengine/Ketsji/KX_MeshProxy.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_MeshProxy.cpp 2009-07-25 19:18:09 UTC (rev 21894)
+++ trunk/blender/source/gameengine/Ketsji/KX_MeshProxy.cpp 2009-07-25 19:34:38 UTC (rev 21895)
@@ -347,7 +347,7 @@
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;
}
More information about the Bf-blender-cvs
mailing list