Skip to content

Commit

Permalink
Fix NullPointerException if CheckFolders call fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcebular committed Sep 7, 2020
1 parent 61491c3 commit 96031a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SyncthingStatus/StatusChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public async Task<bool> CheckAll()
}

FolderResponse[] folders = await CheckFolders();
// Sort folders by name (Label)
Array.Sort(folders, delegate (FolderResponse f1, FolderResponse f2) { return f1.Label.CompareTo(f2.Label); });

if (folders != null)
{
// Sort folders by name (Label)
Array.Sort(folders, delegate (FolderResponse f1, FolderResponse f2) { return f1.Label.CompareTo(f2.Label); });

string tmp = "";
foreach (ToolStripDropDownItem item in TrayMenuItemFolders.DropDownItems)
{
Expand Down

0 comments on commit 96031a3

Please sign in to comment.