going into face select mode for fluidsim meshes segfaulted blender, do a check so it dosent happen.

This commit is contained in:
Campbell Barton
2006-04-07 01:14:08 +00:00
parent 61ad9e26c6
commit 2ddb445c28

View File

@@ -93,6 +93,8 @@
#include "BDR_unwrapper.h"
#include "DNA_object_fluidsim.h" /* for OB_FLUIDSIM_DOMAIN */
/* returns 0 if not found, otherwise 1 */
static int facesel_face_pick(Mesh *me, short *mval, unsigned int *index, short rect)
{
@@ -1428,7 +1430,12 @@ void set_faceselect() /* toggle */
error("Can't edit library data");
return;
}
if (ob->fluidsimFlag & OB_FLUIDSIM_ENABLE && ob->fluidsimSettings && ob->fluidsimSettings->type & OB_FLUIDSIM_DOMAIN) {
error("Can't edit fluidsim enabled data");
return;
}
me= get_mesh(ob);
if(me && me->id.lib) {
error("Can't edit library data");