From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Tue, 13 Feb 2024 07:00:54 +0000 (+1100) Subject: Fix decal error spam (#25172) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4cec0821e40cf0eabde7f8919a0474e2719aa8cb;p=space-station-14.git Fix decal error spam (#25172) --- diff --git a/Content.Client/Decals/Overlays/DecalOverlay.cs b/Content.Client/Decals/Overlays/DecalOverlay.cs index 60b24c154b..8eb1a25664 100644 --- a/Content.Client/Decals/Overlays/DecalOverlay.cs +++ b/Content.Client/Decals/Overlays/DecalOverlay.cs @@ -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(decal.Id, out var decalProto)) + if (!_cachedTextures.TryGetValue(decal.Id, out var cache)) { + // Nothing to cache someone messed up + if (!_prototypeManager.TryIndex(decal.Id, out var decalProto)) + { + continue; + } + cache = (_sprites.Frame0(decalProto.Sprite), decalProto.SnapCardinals); _cachedTextures[decal.Id] = cache; }