diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-09 10:22:00 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-09 10:22:00 +0200 |
commit | 8a5b4510aedc92749424086067e45d3be52c5e07 (patch) | |
tree | 1f847449f395dde39d8013bdf501ea4e2626dbcb /common/store.cpp | |
parent | 0079a50028413ce7e95b74505c9e1b144e0626be (diff) | |
download | sink-8a5b4510aedc92749424086067e45d3be52c5e07.tar.gz sink-8a5b4510aedc92749424086067e45d3be52c5e07.zip |
Deal with null results (as provided by the mailtransport)
Diffstat (limited to 'common/store.cpp')
-rw-r--r-- | common/store.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/store.cpp b/common/store.cpp index 2ee6695..9211b51 100644 --- a/common/store.cpp +++ b/common/store.cpp | |||
@@ -125,7 +125,11 @@ QSharedPointer<QAbstractItemModel> Store::loadModel(Query query) | |||
125 | if (facade) { | 125 | if (facade) { |
126 | Trace() << "Trying to fetch from resource " << resourceInstanceIdentifier; | 126 | Trace() << "Trying to fetch from resource " << resourceInstanceIdentifier; |
127 | auto result = facade->load(query); | 127 | auto result = facade->load(query); |
128 | aggregatingEmitter->addEmitter(result.second); | 128 | if (result.second) { |
129 | aggregatingEmitter->addEmitter(result.second); | ||
130 | } else { | ||
131 | Warning() << "Null emitter for resource " << resourceInstanceIdentifier; | ||
132 | } | ||
129 | result.first.template then<void>([&future]() { future.setFinished(); }).exec(); | 133 | result.first.template then<void>([&future]() { future.setFinished(); }).exec(); |
130 | } else { | 134 | } else { |
131 | Trace() << "Couldn' find a facade for " << resourceInstanceIdentifier; | 135 | Trace() << "Couldn' find a facade for " << resourceInstanceIdentifier; |