Skip to content

Commit

Permalink
[HaCreator] Fix nullreferenceexception when previewing a map without …
Browse files Browse the repository at this point in the history
…a minimap
  • Loading branch information
eaxvac committed Dec 20, 2020
1 parent 6873277 commit 73e761c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HaCreator/MapEditor/Info/BackgroundInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public BoardItem CreateInstance(Board board, int x, int y, int z, int rx, int ry


#region Members
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
public string bS
{
get { return _bS; }
Expand All @@ -211,6 +212,7 @@ public BackgroundInfoType Type
set { this._type = value; }
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
public string no
{
get { return _no; }
Expand Down
5 changes: 5 additions & 0 deletions HaCreator/MapEditor/Instance/BackgroundInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,30 +140,35 @@ public int ry
set { _ry = value; }
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
public int cx
{
get { return _cx; }
set { _cx = value; }
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
public int cy
{
get { return _cy; }
set { _cy = value; }
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
public int a
{
get { return _a; }
set { _a = value; }
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
public BackgroundType type
{
get { return _type; }
set { _type = value; }
}

[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
public bool front
{
get { return _front; }
Expand Down
3 changes: 3 additions & 0 deletions HaCreator/MapSimulator/MapSimulatorLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@ public static NpcItem CreateNpcFromProperty(TexturePool texturePool, NpcInstance
/// <returns></returns>
public static MinimapItem CreateMinimapFromProperty(WzSubProperty minimapFrameProperty, Board mapBoard, GraphicsDevice device, string MapName, string StreetName)
{
if (mapBoard.MiniMap == null)
return null;

WzSubProperty maxMapProperty = (WzSubProperty)minimapFrameProperty["MaxMap"];
WzSubProperty miniMapProperty = (WzSubProperty)minimapFrameProperty["MinMap"];
WzSubProperty maxMapMirrorProperty = (WzSubProperty)minimapFrameProperty["MaxMapMirror"]; // for Zero maps
Expand Down

0 comments on commit 73e761c

Please sign in to comment.