0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-06 02:28:38 +02:00

modules/client/sync/rooms/timeline: Bail faster if no room head idx found.

This commit is contained in:
Jason Volk 2019-02-05 00:55:03 -08:00
parent 08940bddaf
commit 11af393444

View file

@ -104,12 +104,13 @@ ircd::m::sync::room_timeline_polylog(data &data)
data.out
};
assert(data.room);
const auto head_idx
{
m::head_idx(std::nothrow, *data.room)
};
if(!apropos(data, head_idx))
if(!head_idx || !apropos(data, head_idx))
return;
// events