Skip to content

Commit

Permalink
SporeServer: ensure model has blocks in GetArcheTypes()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Nov 8, 2024
1 parent c774d60 commit 8682985
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SporeServer/Models/Xml/SporeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,12 @@ public static SporeArcheType[] GetArcheTypes(SporeModel model)
// create list of blocks that the model has
var blocks = new List<SporeTypes.SporeBlock>();

// ensure blocks exist
if (model.Blocks == null)
{
return types.ToArray();
}

foreach (var block in model.Blocks)
{
var type = block.BlockId[0];
Expand Down

0 comments on commit 8682985

Please sign in to comment.