diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-08-15 22:47:35 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-08-15 22:47:35 +0000 |
commit | 06960c6241f6209b6dd19b4c204c27f1395cda7d (patch) | |
tree | d7222720839731cd4e852923e4d228a39c5cf262 | |
parent | 4f2464b28d36124d9b70581b42064dcf87ac2b1b (diff) |
Fix crash when there's no background task to execute.
-rw-r--r-- | bin/bbackupd/BackupDaemon.cpp | 7 |
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); |