Tell the user he is trying to do a boolean op with a faceless mesh, instead of spewing a meaningless "An internal error occurred -- sorry" message.

This commit is contained in:
Nathan Letwory
2004-04-09 07:42:43 +00:00
parent 0e9e6bdc72
commit 1c3a1ba361
2 changed files with 8 additions and 6 deletions

View File

@@ -1458,7 +1458,7 @@ void special_editmenu(void)
extern short editbutflag;
extern float doublimit;
float fac;
int nr;
int nr,ret;
short randfac;
if(G.obedit==0) {
@@ -1547,10 +1547,12 @@ void special_editmenu(void)
if (base_select) {
if (get_mesh(base_select->object)) {
waitcursor(1);
if (!NewBooleanMesh(BASACT,base_select,nr)) {
ret = NewBooleanMesh(BASACT,base_select,nr);
if (ret==0) {
error("An internal error occurred -- sorry!");
}
} else if(ret==-1) {
error("Boolean ops with faceless meshes is not allowed");
}
waitcursor(0);
} else {