i_wxPyMakeBuffer needs to acquire the GIL

(cherry picked from commit 6885cf4226)
This commit is contained in:
Robin Dunn
2020-05-14 16:25:42 -07:00
committed by Scott Talbert
parent b6883ef19c
commit b7f23e3742

View File

@@ -452,7 +452,7 @@ bool i_wxPyCheckForApp(bool raiseException) {
// Make a memory view object from a C buffer and size.
PyObject* i_wxPyMakeBuffer(void* ptr, Py_ssize_t len, bool readOnly=false) {
// GIL should already be held
wxPyThreadBlocker blocker;
if (ptr && len) {
Py_buffer view;
int flags = PyBUF_FORMAT|PyBUF_ND;