Skip to content

Commit 6c5e186

Browse files
committed
fix segfault
1 parent 3a89f67 commit 6c5e186

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/detail/internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ PYBIND11_NOINLINE internals &get_internals() {
445445
}
446446
}
447447

448-
if (internals_pp) {
448+
if (internals_pp && *internals_pp) {
449449
// We loaded builtins through python's builtins, which means that our `error_already_set`
450450
// and `builtin_exception` may be different local classes than the ones set up in the
451451
// initial exception translator, below, so add another for our local exception classes.

0 commit comments

Comments
 (0)