From Joachim Pouderoux, "Please find attached a very small fix for the DXF reader. The bug made OSG

crash with some files.
Actually, itr was incremented into the loop and after the test with
nlist.end().
Then, the unreferencing of itr when nlist is equals to nlist.end() caused
the crash."
This commit is contained in:
Robert Osfield 2010-09-09 10:17:55 +00:00
parent a5a7bcf165
commit 2f14255dd7

View File

@ -594,8 +594,7 @@ dxfPolyline::drawScene(scene* sc)
double bad_c = 0;
double good_c = 0;
long bad=0,good=0;
for (; itr != nlist.end(); ) {
++itr;
for (; itr != nlist.end(); ++itr) {
if ((*itr)== lastn) continue;
Vec3d diff = ((*itr)-lastn);
diff.normalize();