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. |
||
---|---|---|
.. | ||
openrct2 | ||
openrct2-android | ||
openrct2-cli | ||
openrct2-ui | ||
openrct2-win | ||
thirdparty |