From ea1d0fd37b64d20ea943c1fd61e12370e487e3f4 Mon Sep 17 00:00:00 2001 From: PedroRod Date: Sun, 20 Mar 2016 23:13:28 -0400 Subject: [PATCH] assigned nullptr to _database and _query_stmt upon flushing so that if flush gets called again, will not throw an exception --- include/spdlog/sinks/sqlite_sink.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/spdlog/sinks/sqlite_sink.h b/include/spdlog/sinks/sqlite_sink.h index 81019a71..e4b1de2f 100644 --- a/include/spdlog/sinks/sqlite_sink.h +++ b/include/spdlog/sinks/sqlite_sink.h @@ -32,6 +32,9 @@ namespace spdlog sqlite3_close(_database); sqlite3_finalize(_query_stmt); + + _database = nullptr; + _query_stmt = nullptr; } void bind_to_statement(const details::log_msg& msg) const