X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd9f7fea29e3f8bb61861f52984b7943512346ac..5cd7ab8dd8af0c17ce9dad88830a8d7aefd4f73b:/wxPython/src/_image.i diff --git a/wxPython/src/_image.i b/wxPython/src/_image.i index cdf9ecebb8..1655963fc4 100644 --- a/wxPython/src/_image.i +++ b/wxPython/src/_image.i @@ -204,7 +204,7 @@ public: unsigned char* buffer; int size; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (!PyArg_Parse(data, "t#", &buffer, &size)) goto done; @@ -214,7 +214,7 @@ public: } self->SetData(buffer); done: - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } @@ -258,7 +258,7 @@ public: unsigned char* buffer; int size; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (!PyArg_Parse(data, "t#", &buffer, &size)) goto done; @@ -268,7 +268,7 @@ public: } self->SetAlpha(buffer); done: - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } }