Fix for a recent bugfix, could crash automatic vertex weighting,

forgot to do NULL pointer check.
This commit is contained in:
Brecht Van Lommel
2008-02-24 16:08:33 +00:00
parent 1159bc9189
commit 7098c1b93c

View File

@@ -755,7 +755,7 @@ DerivedMesh *CDDM_from_mesh(Mesh *mesh, Object *ob)
DM_init(dm, mesh->totvert, mesh->totedge, mesh->totface);
dm->deformedOnly = 1;
if(ob->fluidsimSettings && ob->fluidsimSettings->meshSurface)
if(ob && ob->fluidsimSettings && ob->fluidsimSettings->meshSurface)
alloctype= CD_DUPLICATE;
else
alloctype= CD_REFERENCE;