Move the assert which checks for a NULL pointer first.

Klocwork #274.
This commit is contained in:
Neal Norwitz 2006-08-12 01:51:12 +00:00
parent e0a81afb10
commit 9cd3c34b6a
1 changed files with 1 additions and 1 deletions

View File

@ -224,9 +224,9 @@ deque_popleft(dequeobject *deque, PyObject *unused)
deque->leftindex = CENTER + 1;
deque->rightindex = CENTER;
} else {
assert(deque->leftblock != NULL);
assert(deque->leftblock != deque->rightblock);
prevblock = deque->leftblock->rightlink;
assert(deque->leftblock != NULL);
PyMem_Free(deque->leftblock);
assert(prevblock != NULL);
prevblock->leftlink = NULL;