Skip to content

Commit

Permalink
Merge pull request #1103 from VladiStep/GMS2objInstCrashFix
Browse files Browse the repository at this point in the history
Fix of a crash on GMS 2 room open.
  • Loading branch information
Grossley authored Nov 11, 2022
2 parents b6e65c3 + 347340c commit 9336981
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion UndertaleModTool/Editors/UndertaleRoomEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,9 @@ public static void GenerateSpriteCache(UndertaleRoom room)
break;

case LayerType.Instances:
allObjects.AddRange(layer.InstancesData.Instances);
var instances = layer.InstancesData.Instances
.Where(g => g.ObjectDefinition?.Sprite?.Textures.Count > 0);
allObjects.AddRange(instances);
break;
}
}
Expand Down

0 comments on commit 9336981

Please sign in to comment.