Check block parameter after Facebook Infer analyze

This commit is contained in:
Jonathan Gander 2015-06-26 14:03:40 +02:00
parent 1a30bddb8b
commit 1ec55086cd

View File

@ -1315,7 +1315,8 @@ static NSString *FMDBEscapeSavePointName(NSString *savepointName) {
return err;
}
block(&shouldRollback);
if (block)
block(&shouldRollback);
if (shouldRollback) {
// We need to rollback and release this savepoint to remove it
@ -1356,7 +1357,8 @@ 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);
}