Browse Source

Fix potential crash when converting images exported by GIMP.

pull/249/head
Adam Johnson 4 years ago
parent
commit
d07592a3a9
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 3
      korlib/texture.cpp

3
korlib/texture.cpp

@ -283,6 +283,9 @@ static PyObject* pyGLTexture__enter__(pyGLTexture* self) {
// Load image into GL
if (ownit) {
PyObjectRef new_bind = PyObject_CallMethod(self->m_blenderImage, "gl_load", NULL);
if (!new_bind)
return NULL;
if (!PyLong_Check(new_bind)) {
PyErr_SetString(PyExc_TypeError, "gl_load() did not return a long");
return NULL;

Loading…
Cancel
Save