mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-23 00:49:36 +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;
|
||||
|
||||
const char *what() const noexcept override {
|
||||
if (m_lazy_what.empty()) {
|
||||
if (m_lazy_what.empty() && m_type) {
|
||||
try {
|
||||
m_lazy_what = detail::error_string(m_type.ptr(), m_value.ptr(), m_trace.ptr());
|
||||
} catch (...) {
|
||||
|
Loading…
Reference in New Issue
Block a user