summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-11-11 15:33:20 +0100
committerMontel Laurent <[email protected]>2015-11-11 15:33:20 +0100
commit51a33c7cffd964bf6ff2735ba89869237f764af3 (patch)
tree20cbaa658161810fccdb38ad67211c58e4fec014
parent473c5c5f32b656e3421433aca5e59debe09c1740 (diff)
Make sure that we defined topLevelCollection
-rw-r--r--kmail/job/fetchrecursivecollectionsjob.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/kmail/job/fetchrecursivecollectionsjob.cpp b/kmail/job/fetchrecursivecollectionsjob.cpp
index 8dcd994..83cf07c 100644
--- a/kmail/job/fetchrecursivecollectionsjob.cpp
+++ b/kmail/job/fetchrecursivecollectionsjob.cpp
@@ -35,6 +35,12 @@ FetchRecursiveCollectionsJob::~FetchRecursiveCollectionsJob()
void FetchRecursiveCollectionsJob::start()
{
+ if (!mTopCollection.isValid()) {
+ qCWarning(KMAIL_LOG) << "Any collection is defined";
+ Q_EMIT fetchCollectionFailed();
+ deleteLater();
+ return;
+ }
Akonadi::CollectionFetchJob *job = new Akonadi::CollectionFetchJob(mTopCollection, Akonadi::CollectionFetchJob::Recursive);
connect(job, &Akonadi::CollectionFetchJob::result, this, &FetchRecursiveCollectionsJob::slotInitialCollectionFetchingDone);