mirror of https://github.com/OpenRCT2/OpenRCT2.git
be82582063
Calling `Close()` on a window deletes its object, rendering any future uses of its members invalid. In this case `WindowsCloseAll` closed Editor window itself rendering call to `ManageTracks` on a deleted pointer. Previously `WindowsCloseAll` was called, but earlier in the same function we have already closed all windows but Editor itself. It is sufficient to close the editor once we have opened `TrackDesignList`. When this got fixed, I noticed `TrackDesignList` could not locate any rides, which was happening due to calls to `ObjectManager::UnloadAll` in several places. Code to load the selected ride back was added. |
||
---|---|---|
.. | ||
audio | ||
drawing | ||
input | ||
interface | ||
ride | ||
scripting | ||
title | ||
windows | ||
CMakeLists.txt | ||
CursorData.cpp | ||
CursorRepository.cpp | ||
CursorRepository.h | ||
SDLException.cpp | ||
SDLException.h | ||
TextComposition.cpp | ||
TextComposition.h | ||
Ui.cpp | ||
Ui.h | ||
UiContext.Android.cpp | ||
UiContext.Linux.cpp | ||
UiContext.Win32.cpp | ||
UiContext.cpp | ||
UiContext.h | ||
UiContext.macOS.mm | ||
WindowManager.cpp | ||
WindowManager.h | ||
libopenrct2ui.vcxproj |