Fixed pointer null-assignment after delete[]