Closed epje closed 6 years ago
you wouldn't be getting the null pointer on both lines, I assume this is about who
being null rather than the object your code expects it to do. Try a println(who == null)
before them to see if that prints true
. If so, the code that's assigning who
will need some extra care.
Whilst using some methods from the ViewBox class in my code, I encounter a Null Pointer Exception with the following line(s) of code:
setLevelLayer(who.getLevelLayer());
float ax = round(who.getX()), ay = round(who.getY());
I'm using Processing 3.3.6, could this be the issue?