NULL the destroyed pointer early

Merged Ondřej Surý requested to merge ondrej/null-the-destroyed-pointer-early into master

Merge request reports