Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.

Commit 00dee17

Browse files
authored
Merge pull request #51 from villetuh/fix_exception_from_command_line
Fix exception thrown when run from command line
2 parents dd40547 + 07b522b commit 00dee17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎UnityLauncher/Form1.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1128,10 +1128,10 @@ private void UnityVersionsListDownloaded(object sender, DownloadStringCompletedE
11281128
string GetSelectedRowData(string key)
11291129
{
11301130
string path = null;
1131-
var selected = gridRecent.CurrentCell.RowIndex;
1132-
if (selected > -1)
1131+
var selected = gridRecent?.CurrentCell?.RowIndex;
1132+
if (selected.HasValue && selected > -1)
11331133
{
1134-
path = gridRecent.Rows[selected].Cells[key].Value?.ToString();
1134+
path = gridRecent.Rows[selected.Value].Cells[key].Value?.ToString();
11351135
}
11361136
return path;
11371137
}

0 commit comments

Comments
 (0)