aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-09-02 16:58:03 +0000
committerDmitry Sharshakov2021-09-02 16:58:03 +0000
commit2c8910734976059d6921e4a7d6d3d2b16e3a7b00 (patch)
tree7ca2518a3e1866dfc9f200e6eeac7175c1c5dfe9 /helix-term/src/ui
parente0180a4b88172ea808f7a8f14b68f26cec441047 (diff)
Fix crash when stack trace not loaded
Still doesn't address the issue though
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index e661c5a0..17a2df3d 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -455,7 +455,10 @@ impl EditorView {
// if we have a frame, and the frame path matches document
if let (Some(frame), Some(thread_id)) = (debugger.active_frame, debugger.thread_id)
{
- let frame = debugger.stack_frames[&thread_id].get(frame); // TODO: drop the clone..
+ let frame = debugger
+ .stack_frames
+ .get(&thread_id)
+ .and_then(|bt| bt.get(frame)); // TODO: drop the clone..
if let Some(StackFrame {
source: Some(source),
..