diff options
author | Marvin W <git@larma.de> | 2017-04-18 17:55:20 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2017-04-18 20:20:41 +0200 |
commit | 7e388fb2bc784568734592dcb2e863dfa061bed4 (patch) | |
tree | eb4fb804fd7cf9df02b39d37b61937f355785810 /plugins/signal-protocol/src/simple_ss.vala | |
parent | f95b4f4e0949eefaed871c267626e3ff84ce5ca6 (diff) | |
download | dino-7e388fb2bc784568734592dcb2e863dfa061bed4.tar.gz dino-7e388fb2bc784568734592dcb2e863dfa061bed4.zip |
signal-protocol/omemo: fix null-pointer issues
Fixes #44 and #58
Diffstat (limited to 'plugins/signal-protocol/src/simple_ss.vala')
-rw-r--r-- | plugins/signal-protocol/src/simple_ss.vala | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/signal-protocol/src/simple_ss.vala b/plugins/signal-protocol/src/simple_ss.vala index cc8e6b78..5213f736 100644 --- a/plugins/signal-protocol/src/simple_ss.vala +++ b/plugins/signal-protocol/src/simple_ss.vala @@ -7,10 +7,8 @@ public class SimpleSessionStore : SessionStore { private Map<string, ArrayList<SessionStore.Session>> session_map = new HashMap<string, ArrayList<SessionStore.Session>>(); public override uint8[]? load_session(Address address) throws Error { - string name = address.name; - if (name == null) return null; - if (session_map.has_key(name)) { - foreach (SessionStore.Session session in session_map[name]) { + if (session_map.has_key(address.name)) { + foreach (SessionStore.Session session in session_map[address.name]) { if (session.device_id == address.device_id) return session.record; } } |