breakp2.c, prevent crash in `save' command if no circuit is loaded

This commit is contained in:
h_vogt 2016-06-10 21:57:35 +02:00 committed by rlar
parent 34f8841805
commit 77380219d8
1 changed files with 5 additions and 0 deletions

View File

@ -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);