mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-02-02 04:53:26 +08: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)) { }
|
: typeinfo(get_type_info(type_info, false)) { }
|
||||||
|
|
||||||
PYBIND11_NOINLINE bool load(handle src, bool convert) {
|
PYBIND11_NOINLINE bool load(handle src, bool convert) {
|
||||||
|
if (!src)
|
||||||
|
return false;
|
||||||
return load(src, convert, Py_TYPE(src.ptr()));
|
return load(src, convert, Py_TYPE(src.ptr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user