From: Andrew M. Kuchling Date: Thu, 5 Oct 2006 17:06:59 +0000 (+0000) Subject: [Backport r51255 | neal.norwitz] X-Git-Tag: v2.4.4c1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68e1e0372baab7d9734c219258cf84c82e28ab9d;p=thirdparty%2FPython%2Fcpython.git [Backport r51255 | neal.norwitz] Really address the issue of where to place the assert for leftblock. (Followup of Klocwork 274) --- diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c index 1cceb4f58787..4457551bb0a9 100644 --- a/Modules/collectionsmodule.c +++ b/Modules/collectionsmodule.c @@ -211,6 +211,7 @@ deque_popleft(dequeobject *deque, PyObject *unused) PyErr_SetString(PyExc_IndexError, "pop from an empty deque"); return NULL; } + assert(deque->leftblock != NULL); item = deque->leftblock->data[deque->leftindex]; deque->leftindex++; deque->len--;