ObjToJme fix

ObjToJme has a problem reading a line such as:

f -28 -26 -29

f -26 -28 -27

This patch fixes that:

Index: ObjToJme.java


RCS file: /cvs/jme/src/com/jmex/model/XMLparser/Converters/ObjToJme.java,v

retrieving revision 1.3

diff -r1.3 ObjToJme.java


<            if (triplet[1]==null || triplet[1].equals("")){

>            if (triplet.length<2 || triplet[1]==null || triplet[1].equals("")){

Ok, this obviously prevents an ArrayIndexOutOfBoundsEception, but is it correct to return null in this case?

It looks like the second index is for textures and at least in my case it was a face without a texture.

The check on triplet.length now treats it the same as it were empty or null. At least it doesn't make it worse…

Ah, you're right, I read a little bit too fast and thought it would 'return null' but it does 'texture = null'. Fix is committed.