diff --git a/Vienna/Sources/Database/Database.m b/Vienna/Sources/Database/Database.m index 31bb94ea6f..7bf3f3436c 100644 --- a/Vienna/Sources/Database/Database.m +++ b/Vienna/Sources/Database/Database.m @@ -123,11 +123,11 @@ + (instancetype)sharedManager { * @return YES if the database is at the correct version and good to go */ - (BOOL)initialiseDatabase { - __block BOOL success; + __block BOOL success = NO; [self.databaseQueue inDatabase:^(FMDatabase *db) { success = [db executeStatements:@"PRAGMA quick_check;"]; }]; - if (!success) { + if (self.databaseQueue && !success) { NSAlert * alert = [NSAlert new]; alert.alertStyle = NSAlertStyleCritical; alert.messageText = NSLocalizedString(@"Vienna's database seems to be corrupted. Would you like to quit Vienna or continue anyway?", diff --git a/Vienna/Sources/Main window/FoldersTree.m b/Vienna/Sources/Main window/FoldersTree.m index e6dabb110a..9b9002a417 100644 --- a/Vienna/Sources/Main window/FoldersTree.m +++ b/Vienna/Sources/Main window/FoldersTree.m @@ -163,8 +163,7 @@ -(void)reloadDatabase:(NSArray *)stateArray if ((folder.type == VNAFolderTypeRSS || folder.type == VNAFolderTypeOpenReader) && ![installedFolders containsObject:folder]) { - TreeNode *subNode; - subNode = [[TreeNode alloc] init:self.rootNode atIndex:-1 folder:folder canHaveChildren:NO]; + (void)[[TreeNode alloc] init:self.rootNode atIndex:-1 folder:folder canHaveChildren:NO]; } } }