aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-08-05 18:27:53 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-08-05 18:27:53 +0900
commit218a3771e2fdd0bc407b1906f5ebe10fcf95b011 (patch)
treefb3456de834b85189e62477f658931c5d26325de /lib
parent463e987e590ec79eaf60501eedc0c727302bef31 (diff)
downloadlibquotient-218a3771e2fdd0bc407b1906f5ebe10fcf95b011.tar.gz
libquotient-218a3771e2fdd0bc407b1906f5ebe10fcf95b011.zip
eventCast: add an assertion
Diffstat (limited to 'lib')
-rw-r--r--lib/events/event.h1
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;
}