Skip to content

Commit

Permalink
Prevent DTR bar from crashing when there are no text payloads in the …
Browse files Browse the repository at this point in the history
…SeString
  • Loading branch information
haroldiedema committed Aug 13, 2024
1 parent a649521 commit 70bfece
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Umbra/src/Toolbar/Widgets/Library/DtrBar/DtrBarWidget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ private void OnDtrBarEntryUpdated(DtrBarEntry entry)

private void SetNodeLabel(Node node, DtrBarEntry entry)
{
node.FindById("Label")!.NodeValue = GetConfigValue<bool>("PlainText")
var labelNode = node.FindById("Label");
if (labelNode == null) return;

labelNode.NodeValue = GetConfigValue<bool>("PlainText")
? entry.Text.TextValue
: entry.Text;
}
Expand Down

0 comments on commit 70bfece

Please sign in to comment.