瀏覽代碼

Fixes #2389. Running UICatalog with a scenario argument throw ArgumentNullException. (#2390)

BDisp 2 年之前
父節點
當前提交
9360e86961
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      UICatalog/UICatalog.cs

+ 2 - 1
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;
 			}