diff options
Diffstat (limited to 'source/gameengine/VideoTexture/ImageBase.cpp')
-rw-r--r-- | source/gameengine/VideoTexture/ImageBase.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/gameengine/VideoTexture/ImageBase.cpp b/source/gameengine/VideoTexture/ImageBase.cpp index a70c56a070c..65509ab9424 100644 --- a/source/gameengine/VideoTexture/ImageBase.cpp +++ b/source/gameengine/VideoTexture/ImageBase.cpp @@ -375,7 +375,7 @@ void Image_dealloc (PyImage * self) if (self->m_image->m_exports > 0) { PyErr_SetString(PyExc_SystemError, - "deallocated Image object has exported buffers"); + "deallocated Image object has exported buffers"); PyErr_Print(); } // if release requires deleting of object, do it @@ -645,7 +645,7 @@ PyObject * Image_valid(PyImage * self, void * closure) int Image_getbuffer(PyImage *self, Py_buffer *view, int flags) { unsigned int * image; - int ret; + int ret; try { @@ -667,25 +667,25 @@ int Image_getbuffer(PyImage *self, Py_buffer *view, int flags) //return -1; goto error; } - if (view == NULL) + if (view == NULL) { - self->m_image->m_exports++; - return 0; - } - ret = PyBuffer_FillInfo(view, (PyObject*)self, image, self->m_image->getBuffSize(), 0, flags); - if (ret >= 0) - self->m_image->m_exports++; - return ret; + self->m_image->m_exports++; + return 0; + } + ret = PyBuffer_FillInfo(view, (PyObject*)self, image, self->m_image->getBuffSize(), 0, flags); + if (ret >= 0) + self->m_image->m_exports++; + return ret; error: // Return a empty buffer to avoid a crash in Python 3.1 // The bug is fixed in Python SVN 77916, as soon as the python revision used by Blender is // updated, you can simply return -1 and set the error static char* buf = (char *)""; - ret = PyBuffer_FillInfo(view, (PyObject*)self, buf, 0, 0, flags); - if (ret >= 0) - self->m_image->m_exports++; - return ret; + ret = PyBuffer_FillInfo(view, (PyObject*)self, buf, 0, 0, flags); + if (ret >= 0) + self->m_image->m_exports++; + return ret; } |