missing test on cb==NULL added

This commit is contained in:
ganovelli 2009-07-29 13:47:04 +00:00
parent 8484f4522e
commit 2c26fa34d4
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ static int OpenBinary( OpenMeshType &m, const char * filename, CallBackPos *cb=0
/* Read a single facet from an ASCII .STL file */
while(!feof(fp))
{
if((++cnt)%1000) cb( int(double(ftell(fp))*100.0/fileLen), "STL Mesh Loading");
if(cb && (++cnt)%1000) cb( int(double(ftell(fp))*100.0/fileLen), "STL Mesh Loading");
ret=fscanf(fp, "%*s %*s %f %f %f\n", &f.n.X(), &f.n.Y(), &f.n.Z()); // --> "facet normal 0 0 0"
if(ret!=3)
{