3
0
mirror of https://github.com/isar/rusqlite.git synced 2025-03-31 19:12:58 +08:00

Prevent interrupt from non-owned connection

Fix 
This commit is contained in:
gwenn 2024-07-23 19:19:44 +02:00
parent 844842d311
commit a53bcd4769

@ -46,7 +46,7 @@ impl InnerConnection {
pub unsafe fn new(db: *mut ffi::sqlite3, owned: bool) -> InnerConnection {
InnerConnection {
db,
interrupt_lock: Arc::new(Mutex::new(db)),
interrupt_lock: Arc::new(Mutex::new(if owned { db } else { ptr::null_mut() })),
#[cfg(feature = "hooks")]
free_commit_hook: None,
#[cfg(feature = "hooks")]