At line 247 there is what seems to be a bugin the DirectX loader

First there is a check that a string is not empty:

       if (token.size() == 0)
           continue;

Then the second character is accessed, but in the previous check there is
nothing that claims this to be true.

247:        Material * material = _obj->findMaterial(token[1]);


If this line (247) is changed to Material * material =
_obj->findMaterial(token[0]);

instead it works just fine with the .x models I have (not that many though,
so its not a complete test).
Although, the code should slightly more robust.

/Anders

--


________________________________________________________________
Anders Backman               Email:    [EMAIL PROTECTED]
HPC2N/VRlab                  Phone:    +46 (0)90-786 9936
Umea university              Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN         Fax:      +46 90-786 6126
                              http://www.cs.umu.se/~andersb
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to