aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}