Skip to content

Commit

Permalink
Protected against invalid layer links in layer display
Browse files Browse the repository at this point in the history
  • Loading branch information
MonzUn committed Oct 24, 2024
1 parent fc14825 commit 724c8d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DiscordLink/Source/Modules/Displays/LayerDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ protected override async Task HandleConfigChanged(object sender, EventArgs e)
protected override void GetDisplayContent(DiscordTarget target, out List<DisplayContent> displayContent)
{
displayContent = new List<DisplayContent>();
if (!(target is LayerChannelLink layerTarget))
if (!(target is LayerChannelLink layerTarget) || !layerTarget.IsValid())
return;
return;

string output = layerTarget.UseTerrainComparison
Expand Down

0 comments on commit 724c8d6

Please sign in to comment.