C++ code is throwing exception at array[0].TN->HeapIndex = -1. saying that TN is a nullptr. I\'m trying to fix it but I don\'t know what that problem is, it is initialized an