From 8125a187b17f41a199cc4ebaa99f4d616e930049 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 2 Sep 2014 00:15:59 +0200 Subject: m_sqlite3 Fix cleanup of unsuccessful database connections --- src/modules/extra/m_sqlite3.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3