on master help sign in
Fix crash when stack trace not loaded
2c89107Dmitry Sharshakov
helix-term/src/ui/editor.rs+4−1
@@ -455,7 +455,10 @@ impl EditorView {
455 // if we have a frame, and the frame path matches document
455 // if we have a frame, and the frame path matches document
456 if let (Some(frame), Some(thread_id)) = (debugger.active_frame, debugger.thread_id)
456 if let (Some(frame), Some(thread_id)) = (debugger.active_frame, debugger.thread_id)
457 {
457 {
458+ let frame = debugger
459+ .stack_frames
460+ .get(&thread_id)
458− let frame = debugger.stack_frames[&thread_id].get(frame); // TODO: drop the clone..
461+ .and_then(|bt| bt.get(frame)); // TODO: drop the clone..
459 if let Some(StackFrame {
462 if let Some(StackFrame {
460 source: Some(source),
463 source: Some(source),
461 ..
464 ..