From fc9b93b129633d02f74b98e9562ead4200d88963 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 20 Jan 2021 06:41:52 +0100 Subject: [PATCH] Fixed a NRE with tooltips --- MLEM.Ui/Elements/Tooltip.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MLEM.Ui/Elements/Tooltip.cs b/MLEM.Ui/Elements/Tooltip.cs index bcb55fc..e6e72b0 100644 --- a/MLEM.Ui/Elements/Tooltip.cs +++ b/MLEM.Ui/Elements/Tooltip.cs @@ -123,7 +123,8 @@ namespace MLEM.Ui.Elements { } private void Init(Element elementToHover) { - this.Paragraph.AutoAdjustWidth = true; + if (this.Paragraph != null) + this.Paragraph.AutoAdjustWidth = true; this.SetWidthBasedOnChildren = true; this.SetHeightBasedOnChildren = true;