summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/state/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/state/__init__.py b/synapse/state/__init__.py
index 222daa0b28..f1c26d1071 100644
--- a/synapse/state/__init__.py
+++ b/synapse/state/__init__.py
@@ -361,7 +361,12 @@ class StateHandler(object):
             room_id, event_ids
         )
 
-        if len(state_groups_ids) == 1:
+        if len(state_groups_ids) == 0:
+            defer.returnValue(_StateCacheEntry(
+                state={},
+                state_group=None,
+            ))
+        elif len(state_groups_ids) == 1:
             name, state_list = list(state_groups_ids.items()).pop()
 
             prev_group, delta_ids = yield self.store.get_state_group_delta(name)