away3d / away3d-core-fp10

Away3D engine for Flash Player 10

Home Page:http://www.away3d.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loader3D throws a null reference error when attempting to access an obj file with no path separators.

opened this issue · comments

When using the Loader3D class to read in an .obj file with a corresponding .mtl file, I received a reference error on line 485 of src/away3d/loaders/Loader3D.as. Upon investigation, I found that the code assumes that the url variable contains a separator (a '/' or ''). If one is not found, the pathArray is not initialized and the call the pop() attempts to access a null variable.

As a work around, I was able to supply "./" at the beginning of the URL to properly load my 3D object. I'm not sure if core-fp10 is still being maintained but I still have a use for it so I will submit a patch for you to optionally include if you feel it's worth it.