aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-11 18:09:17 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-11 18:09:17 +0900
commitc76150cf77933ef83a7820fc53c22034873675b6 (patch)
treeb85a83c763843b92c38518240fc0a918c4872a5f /lib
parent9af5e25dbc040fa99d05cb23f7df53e3476ab1dd (diff)
downloadlibquotient-c76150cf77933ef83a7820fc53c22034873675b6.tar.gz
libquotient-c76150cf77933ef83a7820fc53c22034873675b6.zip
Room::isRedaction: disallow empty pointers
They should not come anywhere around Room.
Diffstat (limited to 'lib')
-rw-r--r--lib/room.cpp3
1 files changed, 2 insertions, 1 deletions
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)