summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-08-15 22:47:35 +0000
committerChris Wilson <chris+github@qwirx.com>2014-08-15 22:47:35 +0000
commit06960c6241f6209b6dd19b4c204c27f1395cda7d (patch)
treed7222720839731cd4e852923e4d228a39c5cf262 /bin
parent4f2464b28d36124d9b70581b42064dcf87ac2b1b (diff)
Fix crash when there's no background task to execute.
Diffstat (limited to 'bin')
-rw-r--r--bin/bbackupd/BackupDaemon.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/bbackupd/BackupDaemon.cpp b/bin/bbackupd/BackupDaemon.cpp
index 577b1861..91bb29ba 100644
--- a/bin/bbackupd/BackupDaemon.cpp
+++ b/bin/bbackupd/BackupDaemon.cpp
@@ -1884,7 +1884,12 @@ bool BackupDaemon::RunBackgroundTask(State state, uint64_t progress,
{
BOX_TRACE("BackupDaemon::RunBackgroundTask: state = " << state <<
", progress = " << progress << "/" << maximum);
-
+
+ if(!mapCommandSocketPollTimer.get())
+ {
+ return true; // no background task
+ }
+
if(mapCommandSocketPollTimer->HasExpired())
{
mapCommandSocketPollTimer->Reset(COMMAND_SOCKET_POLL_INTERVAL);