[Pkg-owncloud-commits] [owncloud-client] 26/103: Do not dereference the _engine member variable without check.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Apr 30 18:08:55 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit aee7515d42650fb91b0b5de5c9af9d0839b1509e
Author: Klaas Freitag <freitag at owncloud.com>
Date: Tue Apr 15 16:21:21 2014 +0200
Do not dereference the _engine member variable without check.
This can cause the crash because the _engine member is deleted in the
sync finished slot. The solution is to store the stopWatch object
before the engine is destroyed.
Fixes bug #1675
---
src/mirall/folder.cpp | 4 +++-
src/mirall/folder.h | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index 07844c6..7537eb9 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -298,7 +298,8 @@ void Folder::bubbleUpSyncResult()
SyncRunFileLog syncFileLog;
- syncFileLog.start(path(), _engine->stopWatch() );
+ syncFileLog.start(path(), _stopWatch );
+ _stopWatch.reset();
QElapsedTimer timer;
timer.start();
@@ -626,6 +627,7 @@ void Folder::slotSyncFinished()
qDebug() << "-> CSync Finished slot with error " << _csyncError << "warn count" << _syncResult.warnCount();
bubbleUpSyncResult();
+ _stopWatch = _engine->stopWatch();
_engine.reset(0);
// _watcher->setEventsEnabledDelayed(2000);
diff --git a/src/mirall/folder.h b/src/mirall/folder.h
index 1ff8e0b..67a1ca1 100644
--- a/src/mirall/folder.h
+++ b/src/mirall/folder.h
@@ -21,6 +21,7 @@
#include "mirall/progressdispatcher.h"
#include "mirall/syncjournaldb.h"
#include "mirall/clientproxy.h"
+#include "mirall/utility.h"
#include <csync.h>
@@ -186,7 +187,6 @@ private slots:
private:
bool init();
-
void setIgnoredFiles();
void bubbleUpSyncResult();
@@ -217,6 +217,8 @@ private:
ClientProxy _clientProxy;
+ Utility::StopWatch _stopWatch;
+
CSYNC *_csync_ctx;
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list