fix crash in octree server related to getActiveSocket() returning NULL

fixes #1826