diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -56,10 +56,7 @@ { int ret; void *ptr; - if (view == NULL) { - obj->ob_exports++; - return 0; - } + ptr = (void *) PyByteArray_AS_STRING(obj); ret = PyBuffer_FillInfo(view, (PyObject*)obj, ptr, Py_SIZE(obj), 0, flags); if (ret >= 0) {