summaryrefslogtreecommitdiff
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-12-11 08:38:03 +0200
committerGitHub <noreply@github.com>2018-12-11 08:38:03 +0200
commit8905fcc85a6fc3ac394bc89b0bbf40897e9497a6 (patch)
tree5b7afcdceab6dae37e3db90f952c5c76fe46b5cf /Python/ceval.c
parentbb86bf4c4eaa30b1f5192dab9f389ce0bb61114d (diff)
downloadcpython-git-8905fcc85a6fc3ac394bc89b0bbf40897e9497a6.tar.gz
bpo-35454: Fix miscellaneous minor issues in error handling. (#11077)
* bpo-35454: Fix miscellaneous minor issues in error handling. * Fix a null pointer dereference.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index ebe1c50e7b..de6ff29945 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -5109,7 +5109,7 @@ unicode_concatenate(PyObject *v, PyObject *w,
PyObject *names = f->f_code->co_names;
PyObject *name = GETITEM(names, oparg);
PyObject *locals = f->f_locals;
- if (PyDict_CheckExact(locals) &&
+ if (locals && PyDict_CheckExact(locals) &&
PyDict_GetItem(locals, name) == v) {
if (PyDict_DelItem(locals, name) != 0) {
PyErr_Clear();