From 218a3771e2fdd0bc407b1906f5ebe10fcf95b011 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 5 Aug 2018 18:27:53 +0900 Subject: eventCast: add an assertion --- lib/events/event.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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(&*eptr)) { + Q_ASSERT(eptr); return is(*eptr) ? static_cast(&*eptr) : nullptr; } -- cgit v1.2.3