frontend/device.c, com_alter_common(), #1/11 fix error return
This commit is contained in:
parent
a18ac9c474
commit
fd2329c7e9
|
|
@ -1321,6 +1321,8 @@ com_alter_common(wordlist *wl, int do_model)
|
||||||
xsbuf = rem_xsbuf = wl_flatten(words);
|
xsbuf = rem_xsbuf = wl_flatten(words);
|
||||||
/* fprintf(cp_err, "Chain converted %s \n", xsbuf); */
|
/* fprintf(cp_err, "Chain converted %s \n", xsbuf); */
|
||||||
dv = TMALLOC(struct dvec, 1);
|
dv = TMALLOC(struct dvec, 1);
|
||||||
|
if (!dv)
|
||||||
|
return;
|
||||||
dv->v_name = copy("real vector");
|
dv->v_name = copy("real vector");
|
||||||
type &= IF_VARTYPES;
|
type &= IF_VARTYPES;
|
||||||
if (type == IF_REALVEC) {
|
if (type == IF_REALVEC) {
|
||||||
|
|
@ -1337,9 +1339,6 @@ com_alter_common(wordlist *wl, int do_model)
|
||||||
}
|
}
|
||||||
dv->v_length = i;
|
dv->v_length = i;
|
||||||
|
|
||||||
if (!dv)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (dv->v_length < 1) {
|
if (dv->v_length < 1) {
|
||||||
fprintf(cp_err, "Error: cannot evaluate new parameter value.\n");
|
fprintf(cp_err, "Error: cannot evaluate new parameter value.\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue