diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-08-05 18:27:53 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-08-05 18:27:53 +0900 |
commit | 218a3771e2fdd0bc407b1906f5ebe10fcf95b011 (patch) | |
tree | fb3456de834b85189e62477f658931c5d26325de /lib/events/event.h | |
parent | 463e987e590ec79eaf60501eedc0c727302bef31 (diff) | |
download | libquotient-218a3771e2fdd0bc407b1906f5ebe10fcf95b011.tar.gz libquotient-218a3771e2fdd0bc407b1906f5ebe10fcf95b011.zip |
eventCast: add an assertion
Diffstat (limited to 'lib/events/event.h')
-rw-r--r-- | lib/events/event.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/events/event.h b/lib/events/event.h index f3cebfb3..9ba4b85a 100644 --- a/lib/events/event.h +++ b/lib/events/event.h @@ -315,6 +315,7 @@ namespace QMatrixClient inline auto eventCast(const BasePtrT& eptr) -> decltype(static_cast<EventT*>(&*eptr)) { + Q_ASSERT(eptr); return is<EventT>(*eptr) ? static_cast<EventT*>(&*eptr) : nullptr; } |