aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/roster_manager.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-03-20 19:27:39 +0100
committerMarvin W <git@larma.de>2017-03-23 16:48:26 +0100
commitef0483765a0fd567f25b1f0af6df04e8973e5624 (patch)
tree9288c239217496774710542b922cdd264e0838cc /libdino/src/service/roster_manager.vala
parentaca6842c490c52b6460b7d9ebd7cc77eec4b97ef (diff)
downloaddino-ef0483765a0fd567f25b1f0af6df04e8973e5624.tar.gz
dino-ef0483765a0fd567f25b1f0af6df04e8973e5624.zip
Small bug fixes and compatibility with Vala 0.36
Diffstat (limited to 'libdino/src/service/roster_manager.vala')
-rw-r--r--libdino/src/service/roster_manager.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdino/src/service/roster_manager.vala b/libdino/src/service/roster_manager.vala
index 86bd7a21..bb9fbd3a 100644
--- a/libdino/src/service/roster_manager.vala
+++ b/libdino/src/service/roster_manager.vala
@@ -35,10 +35,10 @@ public class RosterManager : StreamInteractionModule, Object {
public Roster.Item? get_roster_item(Account account, Jid jid) {
Core.XmppStream? stream = stream_interactor.get_stream(account);
- if (stream != null) {
- return stream.get_flag(Roster.Flag.IDENTITY).get_item(jid.bare_jid.to_string());
- }
- return null;
+ if (stream == null) return null;
+ Xmpp.Roster.Flag? flag = stream.get_flag(Xmpp.Roster.Flag.IDENTITY);
+ if (flag == null) return null;
+ return flag.get_item(jid.bare_jid.to_string());
}
public void remove_jid(Account account, Jid jid) {