NPE while saving texture

Hi all,

While trying to save a texture in jMe, I have got this exception, it exactly happend, when I tried to serialized the texture that come from the ProceduralTextureGenerator class, I think its because it loads the texture from an ImageIcon, so m_location in the TextureKey will be null their.

My simple hack was to check for null. May be its not the best solution.

   at com.jme.util.TextureKey.write(
   at com.jme.util.export.binary.BinaryExporter.processBinarySavable(Unknown Source)

I have fixed the NPE. Not sure this will really help though (as the texture won't be generated upon load, I think). You should investigate more on what's needed to get it entirely working with store and load.

because the texture is generated you should either A) Save the procedural texture to disk or B) use the storeImage flag to save it inside the terrain binary.

If possible it would possibly be nice to save the generator parameters instead :slight_smile: