From b276e55e787b41cfd91ccf75a28b0e75d992a3cb Mon Sep 17 00:00:00 2001 From: Gammasoft Date: Thu, 10 Oct 2024 16:48:33 +0200 Subject: [PATCH] Fix stack_trace::get_frame --- src/xtd.core/src/xtd/diagnostics/stack_trace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xtd.core/src/xtd/diagnostics/stack_trace.cpp b/src/xtd.core/src/xtd/diagnostics/stack_trace.cpp index f1c86271d1e..12fe31a4543 100644 --- a/src/xtd.core/src/xtd/diagnostics/stack_trace.cpp +++ b/src/xtd.core/src/xtd/diagnostics/stack_trace.cpp @@ -55,7 +55,7 @@ size_t stack_trace::frame_count() const noexcept { } const xtd::diagnostics::stack_frame& stack_trace::get_frame(size_t index) noexcept { - static auto empty_stack_frame = null; + static auto empty_stack_frame = stack_frame {null}; if (data_->frames.size() == 0) return empty_stack_frame; if (index > data_->frames.size() - 1) index = data_->frames.size() - 1; return data_->frames[index];