From 978429018b18a42c0af0c6631123dc5ae20b3ac7 Mon Sep 17 00:00:00 2001 From: Jim Monte Date: Sat, 15 Jun 2019 00:34:11 +0200 Subject: [PATCH] [PATCH #73] Fixed crash when attempting to set a breakpoint without a circuit loaded. --- src/frontend/breakp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/frontend/breakp.c b/src/frontend/breakp.c index 8fa90720e..9256a5368 100644 --- a/src/frontend/breakp.c +++ b/src/frontend/breakp.c @@ -36,6 +36,12 @@ static int steps = 0; void com_stop(wordlist *wl) { + /* Check for an active circuit */ + if (ft_curckt == (struct circ *) NULL) { + fprintf(cp_err, "No circuit loaded. Stopping is not possible.\n"); + return; + } + struct dbcomm *thisone = NULL; struct dbcomm *d = NULL; char *s, buf[64];