From bb7c2dd9c6de0df5d2eb2b2c506e4e16896e72f8 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Tue, 21 Jan 2014 17:38:02 +0200 Subject: [PATCH] Improvements on statistics saving. --- src/qtlibtorrent/torrentspeedmonitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qtlibtorrent/torrentspeedmonitor.cpp b/src/qtlibtorrent/torrentspeedmonitor.cpp index b8071ad8c..ce59190ee 100644 --- a/src/qtlibtorrent/torrentspeedmonitor.cpp +++ b/src/qtlibtorrent/torrentspeedmonitor.cpp @@ -74,8 +74,8 @@ TorrentSpeedMonitor::~TorrentSpeedMonitor() { m_abort = true; m_abortCond.wakeOne(); wait(); - dirty = true; - lastWrite = 0; + if (dirty) + lastWrite = 0; saveStats(); }