From 01ac59df828d03899af2a505206fa039be7ee6ac Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 17 Apr 2019 21:05:31 -0700 Subject: [PATCH] modules/m_rooms: Don't throw from summary_del() for non-existent room. --- modules/m_rooms.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/m_rooms.cc b/modules/m_rooms.cc index e005d93f4..e3141e418 100644 --- a/modules/m_rooms.cc +++ b/modules/m_rooms.cc @@ -420,9 +420,12 @@ ircd::m::rooms::summary_del(const m::room &room) const m::room::state state{public_room_id}; const m::event::idx &event_idx { - state.get("ircd.rooms", make_state_key(state_key_buf, room.room_id)) + state.get(std::nothrow, "ircd.rooms", make_state_key(state_key_buf, room.room_id)) }; + if(!event_idx) + return {}; + const m::event::id::buf event_id { m::event_id(event_idx)