frontend/device.c, com_alter_common(), #1/11 fix error return

This commit is contained in:
rlar 2015-12-26 18:59:27 +01:00
parent a18ac9c474
commit fd2329c7e9
1 changed files with 2 additions and 3 deletions

View File

@ -1321,6 +1321,8 @@ com_alter_common(wordlist *wl, int do_model)
xsbuf = rem_xsbuf = wl_flatten(words);
/* fprintf(cp_err, "Chain converted %s \n", xsbuf); */
dv = TMALLOC(struct dvec, 1);
if (!dv)
return;
dv->v_name = copy("real vector");
type &= IF_VARTYPES;
if (type == IF_REALVEC) {
@ -1337,9 +1339,6 @@ com_alter_common(wordlist *wl, int do_model)
}
dv->v_length = i;
if (!dv)
return;
if (dv->v_length < 1) {
fprintf(cp_err, "Error: cannot evaluate new parameter value.\n");
return;