]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix decal error spam (#25172)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Tue, 13 Feb 2024 07:00:54 +0000 (18:00 +1100)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2024 07:00:54 +0000 (18:00 +1100)
Content.Client/Decals/Overlays/DecalOverlay.cs

index 60b24c154b5e9b7f81bfbfad6c069dc58f5e1fbd..8eb1a256645e128ed3cde7c1bc95f19d6255ede9 100644 (file)
@@ -59,8 +59,14 @@ namespace Content.Client.Decals.Overlays
             {
                 foreach (var decal in decals.Values)
                 {
-                    if (!_cachedTextures.TryGetValue(decal.Id, out var cache) && _prototypeManager.TryIndex<DecalPrototype>(decal.Id, out var decalProto))
+                    if (!_cachedTextures.TryGetValue(decal.Id, out var cache))
                     {
+                        // Nothing to cache someone messed up
+                        if (!_prototypeManager.TryIndex<DecalPrototype>(decal.Id, out var decalProto))
+                        {
+                            continue;
+                        }
+
                         cache = (_sprites.Frame0(decalProto.Sprite), decalProto.SnapCardinals);
                         _cachedTextures[decal.Id] = cache;
                     }