summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-11-02 10:45:57 +0000
committerGitHub <noreply@github.com>2018-11-02 10:45:57 +0000
commitb1995345188e88030bf84ae390fb2bd4ea59ec01 (patch)
treed9c37a75ff4ee179ee11b17bd7469070c8f9c90f /synapse
parentMerge pull request #3778 from z3ntu/patch-1 (diff)
parentNewsfile (diff)
downloadsynapse-b1995345188e88030bf84ae390fb2bd4ea59ec01.tar.xz
Merge pull request #4135 from matrix-org/erikj/fix_state_res_none
Fix None exception in state res v2
Diffstat (limited to 'synapse')
-rw-r--r--synapse/state/v2.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/state/v2.py b/synapse/state/v2.py
index 5d06f7e928..dbc9688c56 100644
--- a/synapse/state/v2.py
+++ b/synapse/state/v2.py
@@ -53,6 +53,10 @@ def resolve_events_with_store(state_sets, event_map, state_res_store):
 
     logger.debug("Computing conflicted state")
 
+    # We use event_map as a cache, so if its None we need to initialize it
+    if event_map is None:
+        event_map = {}
+
     # First split up the un/conflicted state
     unconflicted_state, conflicted_state = _seperate(state_sets)