This commit is contained in:
Kovid Goyal 2012-08-08 11:22:23 +05:30
parent cf567afbd1
commit ca881a5e30

View File

@ -127,7 +127,11 @@ typedef struct {
static void
libmtp_Device_dealloc(libmtp_Device* self)
{
if (self->device != NULL) LIBMTP_Release_Device(self->device);
if (self->device != NULL) {
Py_BEGIN_ALLOW_THREADS;
LIBMTP_Release_Device(self->device);
Py_END_ALLOW_THREADS;
}
self->device = NULL;
Py_XDECREF(self->ids); self->ids = NULL;