1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

do not leak scenarioOpts in CMapInfo

This commit is contained in:
AlexVinS
2016-08-31 06:18:01 +03:00
parent cf1d5d0bc9
commit 437eadf1ed
3 changed files with 10 additions and 3 deletions

View File

@ -1146,7 +1146,7 @@ void SelectionTab::parseGames(const std::unordered_set<ResourceID> &files, bool
// Create the map info object
CMapInfo mapInfo;
mapInfo.mapHeader = make_unique<CMapHeader>();
mapInfo.scenarioOpts = new StartInfo;
mapInfo.scenarioOpts = nullptr;//to be created by serialiser
lf >> *(mapInfo.mapHeader.get()) >> mapInfo.scenarioOpts;
mapInfo.fileURI = file.getName();
mapInfo.countPlayers();