Index: src/wal.c ================================================================== --- src/wal.c +++ src/wal.c @@ -1907,12 +1907,11 @@ /* EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked ** in the SQLITE_CHECKPOINT_PASSIVE mode. */ assert( eMode!=SQLITE_CHECKPOINT_PASSIVE || xBusy==0 ); rc = walCheckpointStart(pWal, zBuf, nBuf, xBusy, pBusyArg, sync_flags, &sC); - if( sC.pIter==0 ) goto walcheckpoint_out; - assert( rc==SQLITE_OK ); + if( sC.pIter==0 || rc!=SQLITE_OK ) goto walcheckpoint_out; /* Step the checkpoint object until it reports something other than ** SQLITE_OK. */ while( SQLITE_OK==(rc = walCheckpointStep(&sC)) ); rc = walCheckpointFinalize(&sC);