Might it be better to check if em->faces.first == NULL before calling finalDM->drawMappedFaces ?
On Mon, Nov 14, 2011 at 7:06 PM, Lukas Toenne <lukas.toe...@googlemail.com> wrote: > Revision: 41823 > > http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41823 > Author: lukastoenne > Date: 2011-11-14 08:06:24 +0000 (Mon, 14 Nov 2011) > Log Message: > ----------- > Fix for #29241, ocean sim modifier crash when removing all vertices. > > The object draw method did not check for valid data when mapping back to > original face, constructive modifier on empty mesh does that. > > Modified Paths: > -------------- > trunk/blender/source/blender/editors/space_view3d/drawobject.c > > Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c > =================================================================== > --- trunk/blender/source/blender/editors/space_view3d/drawobject.c > 2011-11-14 07:18:32 UTC (rev 41822) > +++ trunk/blender/source/blender/editors/space_view3d/drawobject.c > 2011-11-14 08:06:24 UTC (rev 41823) > @@ -2696,7 +2696,8 @@ > { > EditFace *efa = EM_get_face_for_index(index); > > - if (efa->h==0) { > + /* efa=0 for constructive modifier on empty mesh */ > + if (efa && efa->h==0) { > GPU_enable_material(efa->mat_nr+1, NULL); > return 1; > } > > _______________________________________________ > Bf-blender-cvs mailing list > bf-blender-...@blender.org > http://lists.blender.org/mailman/listinfo/bf-blender-cvs > -- - Campbell _______________________________________________ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers