From c4b17c293a682e2213a667b13bb09f5fe1f5f3b3 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 16 Jan 2019 16:38:58 -0800 Subject: [PATCH] ircd::m::event::fetch: Condition on a valid event_idx here. --- ircd/m/event.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ircd/m/event.cc b/ircd/m/event.cc index 899840e93..7cf28db7b 100644 --- a/ircd/m/event.cc +++ b/ircd/m/event.cc @@ -1664,7 +1664,8 @@ ircd::m::event::fetch::fetch(const event::idx &event_idx, opts } { - seek(*this, event_idx, std::nothrow, opts); + if(likely(event_idx)) + seek(*this, event_idx, std::nothrow, opts); } //