Fix the crash when adding new scene during core event processing