[geary/wip/search-cleanup: 3/9] Fix critical trying to load a conversation with 0 email
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/search-cleanup: 3/9] Fix critical trying to load a conversation with 0 email
- Date: Mon, 4 Feb 2019 12:14:43 +0000 (UTC)
commit 710f99df359b33663ee9b7f28b51323213912b90
Author: Michael Gratton <mike vee net>
Date: Mon Feb 4 00:16:22 2019 +1100
Fix critical trying to load a conversation with 0 email
This can happen when the search is changing and a number of
conversations are evaporating.
src/client/application/geary-controller.vala | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index bb45ede4..904a7983 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1271,7 +1271,13 @@ public class GearyController : Geary.BaseObject {
Geary.App.EmailStore? store = get_store_for_folder(
convo.base_folder
);
- if (store != null) {
+
+ // It's possible for a conversation with zero email to
+ // be selected, when it has just evaporated after its
+ // last email was removed but the conversation monitor
+ // hasn't signalled its removal yet. In this case,
+ // just don't load it since it will soon disappear.
+ if (store != null && convo.get_count() > 0) {
viewer.load_conversation.begin(
convo,
store,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]