From 77380219d87ef477ff3879bfcbf2f428d8939a0a Mon Sep 17 00:00:00 2001 From: h_vogt Date: Fri, 10 Jun 2016 21:57:35 +0200 Subject: [PATCH] breakp2.c, prevent crash in `save' command if no circuit is loaded --- src/frontend/breakp2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontend/breakp2.c b/src/frontend/breakp2.c index ee1e19e6a..83fc05831 100644 --- a/src/frontend/breakp2.c +++ b/src/frontend/breakp2.c @@ -52,6 +52,11 @@ settrace(wordlist *wl, int what, char *name) struct dbcomm *d, *td; char *s; + if (!ft_curckt) { + fprintf(cp_err, "Error: no circuit loaded\n"); + return; + } + while (wl) { s = cp_unquote(wl->wl_word); d = TMALLOC(struct dbcomm, 1);