Skip to content

Commit 90e4800

Browse files
committed
check null ptr
1 parent 6a828d7 commit 90e4800

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ dummy_func(void) {
899899
(void)args;
900900
callable = sym_new_not_null(ctx);
901901
PyTypeObject *tp = _PyType_LookupByVersion(type_version);
902-
if (tp->tp_basicsize > sizeof(PyObject) && !(tp->tp_flags & Py_TPFLAGS_MANAGED_DICT)) {
902+
if (tp != NULL && tp->tp_basicsize > sizeof(PyObject) && !(tp->tp_flags & Py_TPFLAGS_MANAGED_DICT)) {
903903
self_or_null = sym_new_slots_object(ctx, type_version);
904904
} else {
905905
self_or_null = sym_new_not_null(ctx);

Python/optimizer_cases.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)