bpo-38202: Fix a crash in dict_view & non-itearble. (GH-16241)

diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index b496350..64876e0 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -4227,6 +4227,10 @@
         return NULL;
 
     it = PyObject_GetIter(other);
+    if (it == NULL) {
+        Py_DECREF(result);
+        return NULL;
+    }
 
     if (PyDictKeys_Check(self)) {
         dict_contains = dictkeys_contains;