Skip to content

Commit

Permalink
Fix stack_trace::get_frame
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Oct 10, 2024
1 parent 71febd6 commit b276e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xtd.core/src/xtd/diagnostics/stack_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit b276e55

Please sign in to comment.