aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-08-26 17:20:10 +0200
committerfiaxh <git@lightrise.org>2019-08-26 17:20:10 +0200
commitd02f7b6a3ace7c9248db15996e7a6d50a22d2582 (patch)
tree50df289b58cddc1d16332cfffcab598e406e44d7 /plugins/omemo/src
parentff6caf241c4d57d3ef124a8b7c3144a09f320ea0 (diff)
downloaddino-d02f7b6a3ace7c9248db15996e7a6d50a22d2582.tar.gz
dino-d02f7b6a3ace7c9248db15996e7a6d50a22d2582.zip
Fix runtime critical
Diffstat (limited to 'plugins/omemo/src')
-rw-r--r--plugins/omemo/src/logic/manager.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/omemo/src/logic/manager.vala b/plugins/omemo/src/logic/manager.vala
index b90c868b..a71dfd9d 100644
--- a/plugins/omemo/src/logic/manager.vala
+++ b/plugins/omemo/src/logic/manager.vala
@@ -380,8 +380,11 @@ public class Manager : StreamInteractionModule, Object {
public async bool ensure_get_keys_for_jid(Account account, Jid jid) {
if (trust_manager.is_known_address(account, jid)) return true;
XmppStream? stream = stream_interactor.get_stream(account);
- var device_list = yield stream_interactor.module_manager.get_module(account, StreamModule.IDENTITY).request_user_devicelist((!)stream, jid);
- return device_list.size > 0;
+ if (stream != null) {
+ var device_list = yield stream_interactor.module_manager.get_module(account, StreamModule.IDENTITY).request_user_devicelist(stream, jid);
+ return device_list.size > 0;
+ }
+ return true; // TODO wait for stream?
}
public static void start(StreamInteractor stream_interactor, Database db, TrustManager trust_manager) {