Commit f5279c65 authored by Chris Heywood's avatar Chris Heywood

GC vacuum: verify non-null services

Check IMAP and SMTP aren't null before stopping and starting, although
this should never occur anymore as we don't vacuum at startup.
parent 47a5fbcd
Pipeline #142609 passed with stages
in 17 minutes and 31 seconds
......@@ -117,8 +117,10 @@ private class Geary.ImapDB.Database : Geary.Db.VersionedDatabase {
if ((recommended & GC.RecommendedOperation.VACUUM) != 0) {
if (allow_vacuum) {
this.want_background_vacuum = false;
yield account.imap.stop(gc_cancellable);
yield account.smtp.stop(gc_cancellable);
if (account.imap != null)
yield account.imap.stop(gc_cancellable);
if (account.smtp != null)
yield account.smtp.stop(gc_cancellable);
if (!vacuum_monitor.is_in_progress)
vacuum_monitor.notify_start();
......@@ -135,8 +137,10 @@ private class Geary.ImapDB.Database : Geary.Db.VersionedDatabase {
vacuum_monitor.notify_finish();
}
yield account.imap.start(gc_cancellable);
yield account.smtp.start(gc_cancellable);
if (account.imap != null)
yield account.imap.start(gc_cancellable);
if (account.smtp != null)
yield account.smtp.start(gc_cancellable);
} else {
// Flag a vacuum to run later when we've been idle in the background
debug("Flagging desire to GC vacuum");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment