From 6c03ef2bd94c20619a64f1809adc8de105ebb805 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 30 May 2020 22:48:09 +0200 Subject: [PATCH] fixed hidden panels trying to update, causing a crash --- MLEM.Ui/Elements/Panel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MLEM.Ui/Elements/Panel.cs b/MLEM.Ui/Elements/Panel.cs index d0be470..32ace95 100644 --- a/MLEM.Ui/Elements/Panel.cs +++ b/MLEM.Ui/Elements/Panel.cs @@ -199,7 +199,7 @@ namespace MLEM.Ui.Elements { /// Prepares the panel for auto-scrolling, creating the render target and setting up the scroll bar's maximum value. /// protected virtual void ScrollSetup() { - if (!this.scrollOverflow) + if (!this.scrollOverflow || this.IsHidden) return; // if there is only one child, then we have just the scroll bar if (this.Children.Count == 1)