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

Commit

Permalink
Merge pull request #51 from villetuh/fix_exception_from_command_line
Browse files Browse the repository at this point in the history
Fix exception thrown when run from command line
  • Loading branch information
unitycoder committed Mar 29, 2018
2 parents dd40547 + 07b522b commit 00dee17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions UnityLauncher/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,10 +1128,10 @@ private void UnityVersionsListDownloaded(object sender, DownloadStringCompletedE
string GetSelectedRowData(string key)
{
string path = null;
var selected = gridRecent.CurrentCell.RowIndex;
if (selected > -1)
var selected = gridRecent?.CurrentCell?.RowIndex;
if (selected.HasValue && selected > -1)
{
path = gridRecent.Rows[selected].Cells[key].Value?.ToString();
path = gridRecent.Rows[selected.Value].Cells[key].Value?.ToString();
}
return path;
}
Expand Down

0 comments on commit 00dee17

Please sign in to comment.