Skip to content

Commit

Permalink
Ensure closed sqlite3 connections are never reused
Browse files Browse the repository at this point in the history
This could happen if the clipboard was updated after an NSApplicationWillTerminateNotification had been sent.
  • Loading branch information
sorbits committed Apr 29, 2021
1 parent 1f68037 commit 965028a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Frameworks/OakAppKit/src/OakPasteboard.mm
Expand Up @@ -366,6 +366,7 @@ + (sqlite3*)SQLDatabase
os_log_info(kLogSQLite, "Closing sqlite3 database");
if(sqlite3_close(db) != SQLITE_OK)
os_log_error(kLogSQLite, "sqlite3_close: %{public}s", sqlite3_errmsg(db));
db = nullptr;
}];

char const* query =
Expand Down

0 comments on commit 965028a

Please sign in to comment.