mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-29 10:03:22 +03:00
check for empty frames
This commit is contained in:
parent
18818daa68
commit
4ad3ec7da3
@ -2377,6 +2377,10 @@ impl<'a> Cursor<'a> {
|
||||
/// stack. Once that has executed and we've returned to the conditional, the final step
|
||||
/// does nothing.
|
||||
pub fn step(&mut self) -> Result<StepResult> {
|
||||
if self.frames.is_empty() {
|
||||
halt!("no execution frames available");
|
||||
}
|
||||
|
||||
let Frame { element, step, user_initiated } = self.frames.last().expect("there should be a frame");
|
||||
let user_initiated = *user_initiated;
|
||||
match element {
|
||||
|
Loading…
Reference in New Issue
Block a user