failed implicit conversions shouldn't lead to nullptr dereference

This commit is contained in:
Wenzel Jakob 2016-09-30 13:43:19 +02:00
parent cd4d7d6bf8
commit 103d78d368

View File

@ -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()));
}