Avoid potential corruption of FoldersOrder setting

pull/249/head
Francis Lachapelle 2019-02-18 11:38:45 -05:00
parent 15c6074907
commit 601981c040
1 changed files with 5 additions and 1 deletions

View File

@ -20,6 +20,7 @@
#import <Foundation/NSValue.h>
#import <NGExtensions/NSObject+Logs.h>
#import <SOGo/NSDictionary+Utilities.h>
#import <SOGo/SOGoPermissions.h>
@ -147,7 +148,10 @@ _intValueFromHex (NSString *hexString)
{
folder = [sortedFolders objectAtIndex: count];
folderName = [folder nameInContainer];
[sortedFolderNames addObject: folderName];
if (folderName)
[sortedFolderNames addObject: folderName];
else
[self errorWithFormat: @"Unexpected entry in FoldersOrder setting: %@", folder];
}
}