- bug fix, access thru null displist (rare, triggered by another bug

where mesh displist isn't rebuilt)
This commit is contained in:
Daniel Dunbar
2004-01-18 18:04:58 +00:00
parent ede644969b
commit 73665ee9bd

View File

@@ -452,7 +452,7 @@ void count_object(Object *ob, int sel)
if(me) {
int totvert, totface;
/* hack, should be getting displistmesh from a central function */
if (mesh_uses_displist(me) && ((DispList*)me->disp.first)->type==DL_MESH) {
if (mesh_uses_displist(me) && me->disp.first && ((DispList*)me->disp.first)->type==DL_MESH) {
DispListMesh *dlm= ((DispList*)me->disp.first)->mesh;
totvert= dlm->totvert;
totface= dlm->totface;