Skip to content

Comment on Avoiding game crashes related to linked listsparent

Comments

Indeed, I may have read the code wrong. But look at line 188.

    m_prevLink->m_nextNode = m_nextNode;
I don't see where m_prevLink is changed. If the previous link has gone away, and you call RemoveFromList on this node a second time, it's going to chase that pointer.

RemoveFromList is a private method. All the public methods, other than the destructor, that call it also modify m_prevLink.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.