From e549aac12714c36f3a27d131a031d219283ac3d7 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 24 Nov 2014 13:47:58 +0000 Subject: [PATCH] Add missing None check --- synapse/api/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/api/auth.py b/synapse/api/auth.py index cbf3ae0ca..c4597c175 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -155,7 +155,7 @@ class Auth(object): # Get room creation event: key = (RoomCreateEvent.TYPE, "", ) create = event.old_state_events.get(key) - if event.prev_events[0][0] == create.event_id: + if create and event.prev_events[0][0] == create.event_id: if create.content["creator"] == event.state_key: return True