Ver código fonte

Merge branch 'Sigmanet15-master'

August Mueller 10 anos atrás
pai
commit
1b346b5271
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      src/fmdb/FMDatabase.m

+ 6 - 2
src/fmdb/FMDatabase.m

@@ -1315,7 +1315,9 @@ - (NSError*)inSavePoint:(void (^)(BOOL *rollback))block {
         return err;
     }
     
-    block(&shouldRollback);
+    if (block) {
+        block(&shouldRollback);
+    }
     
     if (shouldRollback) {
         // We need to rollback and release this savepoint to remove it
@@ -1356,7 +1358,9 @@ void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3
 #else
     void (^block)(sqlite3_context *context, int argc, sqlite3_value **argv) = (__bridge id)sqlite3_user_data(context);
 #endif
-    block(context, argc, argv);
+    if (block) {
+        block(context, argc, argv);
+    }
 }