pointerdetector: Fix segmentation fault in finalize

Change-Id: I6303db216005d5b5b579b070d45ed553662fb8a6