diff --git a/code/SQLite3Query.php b/code/SQLite3Query.php index 6b42f77..c26e5c4 100644 --- a/code/SQLite3Query.php +++ b/code/SQLite3Query.php @@ -39,7 +39,7 @@ class SQLite3Query extends Query public function __destruct() { - if ($this->handle) { + if ($this->handle && $this->database->isActive()) { $this->handle->finalize(); } }