Skip to content

Commit 8682985

Browse files
committed
SporeServer: ensure model has blocks in GetArcheTypes()
1 parent c774d60 commit 8682985

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

SporeServer/Models/Xml/SporeModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,12 @@ public static SporeArcheType[] GetArcheTypes(SporeModel model)
778778
// create list of blocks that the model has
779779
var blocks = new List<SporeTypes.SporeBlock>();
780780

781+
// ensure blocks exist
782+
if (model.Blocks == null)
783+
{
784+
return types.ToArray();
785+
}
786+
781787
foreach (var block in model.Blocks)
782788
{
783789
var type = block.BlockId[0];

0 commit comments

Comments
 (0)