From c76150cf77933ef83a7820fc53c22034873675b6 Mon Sep 17 00:00:00 2001 From: Kitsune Ral <Kitsune-Ral@users.sf.net> Date: Wed, 11 Jul 2018 18:09:17 +0900 Subject: Room::isRedaction: disallow empty pointers They should not come anywhere around Room. --- lib/room.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/room.cpp b/lib/room.cpp index b4d0f47c..3bfa0d28 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1283,7 +1283,8 @@ void Room::Private::dropDuplicateEvents(RoomEvents& events) const inline bool isRedaction(const RoomEventPtr& e) { - return e && is<RedactionEvent>(*e); + Q_ASSERT(e); + return is<RedactionEvent>(*e); } void Room::Private::processRedaction(event_ptr_tt<RedactionEvent>&& redaction) -- cgit v1.2.3