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 @@ public function __construct(SQLite3Connector $database, SQLite3Result $handle) public function __destruct() { - if ($this->handle) { + if ($this->handle && $this->database->isActive()) { $this->handle->finalize(); } }