From 8811a9ff5817ac15b2095ff630301de7ed7c4adb Mon Sep 17 00:00:00 2001 From: NyakoFox Date: Sun, 20 Feb 2022 15:05:54 -0400 Subject: [PATCH] Fix errors on room exit --- UndertaleModTool/Converters/GridConverter.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UndertaleModTool/Converters/GridConverter.cs b/UndertaleModTool/Converters/GridConverter.cs index 4f2e28a20..911e08a04 100644 --- a/UndertaleModTool/Converters/GridConverter.cs +++ b/UndertaleModTool/Converters/GridConverter.cs @@ -13,6 +13,8 @@ public class GridConverter : IMultiValueConverter { public object Convert(object[] values, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) { + if (values.Any(x => x is not double)) + return new Rect(); return new Rect(0, 0, (double)values[0], (double)values[1]); }