Skip to content

Commit ea8edae

Browse files
committed
upgrade project: handle null installation list, fixes #221
1 parent 609b244 commit ea8edae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

UnityLauncherPro/UpgradeWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public UpgradeWindow(string currentVersion, string projectPath, string commandLi
1919
txtCurrentVersion.Text = currentVersion;
2020
txtCurrentPlatform.Text = Tools.GetTargetPlatform(projectPath);
2121

22-
if (gridAvailableVersions.ItemsSource == null)
22+
if (!ReferenceEquals(gridAvailableVersions.ItemsSource, MainWindow.unityInstallationsSource))
2323
{
2424
gridAvailableVersions.ItemsSource = MainWindow.unityInstallationsSource;
2525
}
@@ -44,7 +44,7 @@ public UpgradeWindow(string currentVersion, string projectPath, string commandLi
4444
// find nearest version
4545
string nearestVersion = Tools.FindNearestVersion(currentVersion, MainWindow.unityInstalledVersions.Keys.ToList());
4646

47-
if (nearestVersion != null)
47+
if (nearestVersion != null && MainWindow.unityInstallationsSource != null)
4848
{
4949
// select nearest version
5050
for (int i = 0; i < MainWindow.unityInstallationsSource.Count; i++)

0 commit comments

Comments
 (0)