Commit 103d78d3 by Wenzel Jakob

failed implicit conversions shouldn't lead to nullptr dereference

parent cd4d7d6b
...@@ -160,6 +160,8 @@ public: ...@@ -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()));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment