Alternative fix for #246 NPE.

This should terminate the infinite post loop when the PTR is destroyed.