mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-23 17:09:27 +00:00
guard if m_type is null
This commit is contained in:
parent
68b349a234
commit
91bf33f459
@ -397,7 +397,7 @@ public:
|
|||||||
inline ~error_already_set() override;
|
inline ~error_already_set() override;
|
||||||
|
|
||||||
const char *what() const noexcept override {
|
const char *what() const noexcept override {
|
||||||
if (m_lazy_what.empty()) {
|
if (m_lazy_what.empty() && m_type) {
|
||||||
try {
|
try {
|
||||||
m_lazy_what = detail::error_string(m_type.ptr(), m_value.ptr(), m_trace.ptr());
|
m_lazy_what = detail::error_string(m_type.ptr(), m_value.ptr(), m_trace.ptr());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
Loading…
Reference in New Issue
Block a user