From 9360e869611c93e8708deeff38f87feb4aa135af Mon Sep 17 00:00:00 2001 From: BDisp Date: Thu, 2 Mar 2023 16:16:51 +0000 Subject: [PATCH] Fixes #2389. Running UICatalog with a scenario argument throw ArgumentNullException. (#2390) --- UICatalog/UICatalog.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UICatalog/UICatalog.cs b/UICatalog/UICatalog.cs index ce35ea9a8..161657f70 100644 --- a/UICatalog/UICatalog.cs +++ b/UICatalog/UICatalog.cs @@ -84,12 +84,13 @@ namespace UICatalog { _selectedScenario = (Scenario)Activator.CreateInstance (_scenarios [item].GetType ()); Application.UseSystemConsole = _useSystemConsole; Application.Init (); - _selectedScenario.Init (Colors.ColorSchemes [_topLevelColorScheme]); + _selectedScenario.Init (Colors.ColorSchemes [_topLevelColorScheme == null ? "Base" : _topLevelColorScheme]); _selectedScenario.Setup (); _selectedScenario.Run (); _selectedScenario.Dispose (); _selectedScenario = null; Application.Shutdown (); + VerifyObjectsWereDisposed (); return; }