Skip to content

Commit

Permalink
Fixed crash when creating a new map in the editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrettin committed Dec 5, 2016
1 parent c14c114 commit b3a1647
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/editor/editloop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2534,7 +2534,12 @@ void CEditor::Init()

//Wyrmgus start
// Map.Fields = new CMapField[Map.Info.MapWidth * Map.Info.MapHeight];
Map.Fields.clear();
Map.Fields.push_back(new CMapField[Map.Info.MapWidth * Map.Info.MapHeight]);
Map.Info.MapWidths.clear();
Map.Info.MapWidths.push_back(Map.Info.MapWidth);
Map.Info.MapHeights.clear();
Map.Info.MapHeights.push_back(Map.Info.MapHeight);
Map.TimeOfDaySeconds.push_back(DefaultTimeOfDaySeconds);
Map.TimeOfDay.push_back(NoTimeOfDay);
Map.Planes.push_back(NULL);
Expand Down

0 comments on commit b3a1647

Please sign in to comment.