Fix SceneStructureWindow/SceneTreeWidget/UndoManager null pointer access.