diff --git a/Python/bytecodes.c b/Python/bytecodes.c index de308416b9d973..8568d4656b8dba 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -1551,7 +1551,7 @@ dummy_func( ERROR_NO_POP(); } if (v_o == NULL) { - if (PyMapping_GetItemRef(GLOBALS(), name, &v_o) < 0) { + if (PyMapping_GetOptionalItem(GLOBALS(), name, &v_o) < 0) { ERROR_NO_POP(); } if (v_o == NULL) {