Skip to content

Commit 9c4cd30

Browse files
authored
BUGFIX: #137
1 parent c9c13dd commit 9c4cd30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pager.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,10 @@ static int unqliteFinalizeJournal(Pager *pPager,int *pRetry,int close_jrnl)
16661666
/* Journaling is omitted, return immediately */
16671667
return UNQLITE_OK;
16681668
}
1669+
if (pPager->pjfd == 0) {
1670+
/* BUGFIX: https://github.com/symisc/unqlite/issues/137 */
1671+
return UNQLITE_ABORT; /* Ongoing operation must be aborted */
1672+
}
16691673
/* Write the total number of database records */
16701674
rc = WriteInt32(pPager->pjfd,pPager->nRec,8 /* sizeof(aJournalRec) */);
16711675
if( rc != UNQLITE_OK ){

0 commit comments

Comments
 (0)