guard if m_type is null

This commit is contained in:
Aaron Gokaslan 2022-02-15 11:30:06 -05:00
parent 68b349a234
commit 91bf33f459

View File

@ -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 (...) {