mirror of
https://github.com/H-uru/korman.git
synced 2025-07-16 18:35:39 +00:00
Fix potential crash when converting images exported by GIMP.
This commit is contained in:
@ -283,6 +283,9 @@ static PyObject* pyGLTexture__enter__(pyGLTexture* self) {
|
|||||||
// Load image into GL
|
// Load image into GL
|
||||||
if (ownit) {
|
if (ownit) {
|
||||||
PyObjectRef new_bind = PyObject_CallMethod(self->m_blenderImage, "gl_load", NULL);
|
PyObjectRef new_bind = PyObject_CallMethod(self->m_blenderImage, "gl_load", NULL);
|
||||||
|
if (!new_bind)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!PyLong_Check(new_bind)) {
|
if (!PyLong_Check(new_bind)) {
|
||||||
PyErr_SetString(PyExc_TypeError, "gl_load() did not return a long");
|
PyErr_SetString(PyExc_TypeError, "gl_load() did not return a long");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user