diff options
-rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 7f6a53359..1e3a65a18 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -97,8 +97,11 @@ class SQLConn : public SQLProvider ~SQLConn() { - sqlite3_interrupt(conn); - sqlite3_close(conn); + if (conn) + { + sqlite3_interrupt(conn); + sqlite3_close(conn); + } } void Query(SQLQuery* query, const std::string& q) |