DarkRadiant: master bf77456d

Author Committer Branch Timestamp Parent
orbweaver orbweaver master 31.01.2021 17:28 master c9cbda76
Changeset Fix possible crash in shutting down selection system

When the selection system shuts down it clears out any remaining selected
nodes, which causes the SelectableNode destructor to unselect the node, which
then tries to call back into the selection system using Node::getSelf() which
finally results in a shared_from_this() being called from within the node's own
destructor, which shared_ptr really doesn't like.

This is resolved by having the selection system instruct any remaining selected
nodes to unselect themselves before clearing out the list, thus ensuring that
the same sequence happens before the node's destructor is invoked.
mod - radiantcore/selection/RadiantSelectionSystem.cpp Diff File
mod - test/Entity.cpp Diff File