Nullify deleted pointers.
Merge pull request #1112 from mc-server/danglingptrs

Nullify deleted pointers.