Fix NPE errors in QuadTree.

Signed-off-by: Adrien <berthet.a@gmail.com>