summaryrefslogtreecommitdiff
path: root/src/if_py_both.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index f627f67af..d828358e7 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -818,21 +818,21 @@ DictionaryAssItem(PyObject *self, PyObject *keyObject, PyObject *valObject)
if (valObject == NULL)
{
+ hashitem_T *hi;
+
if (di == NULL)
{
PyErr_SetString(PyExc_IndexError, _("no such key in dictionary"));
return -1;
}
- hashitem_T *hi = hash_find(&d->dv_hashtab, di->di_key);
+ hi = hash_find(&d->dv_hashtab, di->di_key);
hash_remove(&d->dv_hashtab, hi);
dictitem_free(di);
return 0;
}
if (ConvertFromPyObject(valObject, &tv) == -1)
- {
return -1;
- }
if (di == NULL)
{