mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 15:20:34 +00:00
failed implicit conversions shouldn't lead to nullptr dereference
This commit is contained in:
parent
cd4d7d6bf8
commit
103d78d368
@ -160,6 +160,8 @@ public:
|
||||
: typeinfo(get_type_info(type_info, false)) { }
|
||||
|
||||
PYBIND11_NOINLINE bool load(handle src, bool convert) {
|
||||
if (!src)
|
||||
return false;
|
||||
return load(src, convert, Py_TYPE(src.ptr()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user