4
4
mirror of https://github.com/H-uru/korman.git synced 2025-07-14 02:27:36 -04:00

Fix issues resulting from incorrect korlib merge

I merged the version with access violations related to textures not
actually being set in OpenGL. Dang! Here is the correct version.
This commit is contained in:
2015-07-17 16:55:13 -04:00
parent d27630f501
commit f0ee39b1c3
2 changed files with 20 additions and 9 deletions

View File

@ -27,9 +27,14 @@ class PyObjectRef {
public:
PyObjectRef(PyObject* o) : m_object(o) { }
~PyObjectRef() { if (m_object) Py_DECREF(m_object); }
~PyObjectRef() { Py_XDECREF(m_object); }
operator PyObject*() const { return m_object; }
PyObjectRef& operator =(PyObject* rhs) {
Py_XDECREF(m_object);
m_object = rhs;
return *this;
}
};
#endif // _KORLIB_H