From 2c26fa34d4d8bde5acc9e350ee8a83447df8a850 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Wed, 29 Jul 2009 13:47:04 +0000 Subject: [PATCH] missing test on cb==NULL added --- wrap/io_trimesh/import_stl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrap/io_trimesh/import_stl.h b/wrap/io_trimesh/import_stl.h index e215f248..8373a9c4 100644 --- a/wrap/io_trimesh/import_stl.h +++ b/wrap/io_trimesh/import_stl.h @@ -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) {