ibireme 9 年之前
父节点
当前提交
1cce46a4a1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      YYWebImage/Cache/YYKVStorage.m

+ 1 - 1
YYWebImage/Cache/YYKVStorage.m

@@ -716,8 +716,8 @@ static UIApplication *_YYSharedApplication() {
         if (![self _dbOpen] || ![self _dbInitialize]) {
         if (![self _dbOpen] || ![self _dbInitialize]) {
             [self _dbClose];
             [self _dbClose];
             NSLog(@"YYKVStorage init error: fail to open sqlite db.");
             NSLog(@"YYKVStorage init error: fail to open sqlite db.");
+            return nil;
         }
         }
-        return nil;
     }
     }
     [self _fileEmptyTrashInBackground]; // empty the trash if failed at last time
     [self _fileEmptyTrashInBackground]; // empty the trash if failed at last time
     return self;
     return self;