From edea8650233e7f70df27d5b3e3febc1cfde85742 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 16 Mar 2010 02:50:20 +0000 Subject: [PATCH] fix unloading of GeoIP database to not cause potential crashes while shutting down --- src/session_impl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 9f706d8d8..fefa03303 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -3474,6 +3474,8 @@ namespace aux { #ifndef TORRENT_DISABLE_GEO_IP if (m_asnum_db) GeoIP_delete(m_asnum_db); if (m_country_db) GeoIP_delete(m_country_db); + m_asnum_db = 0; + m_country_db = 0; #endif #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) (*m_logger) << time_now_string() << " waiting for main thread\n";