I’m trying to get a rudimentory particel engine built for y game project.
I have a number of different classes that all eventualy add their particle effect to a publicaly available ArrayList (the global effect list) in my Game class that stores them for rendering and update.
There are a few times that for some reason I cant explain, where I get a NullPointerExeption when adding to this list, even after it has already been sucsessfully accessed, written to and read from with no problem.
The error apears to be happening only when my ParticleEmitterComponent trys to add its effect to the global effect list, at which point the NullPointerException occours. I think this means that the list itself is equle to null - but I’m not sure if that is what this error means.
If anyone can help or explain to me exactly what this error means, it would be much apreceated.
Below is the quoted code from my project journal thread.