From 5ef66b5cf656717b335b586a81ffe4112e37f60b Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 9 Nov 2024 18:45:38 -0500 Subject: [PATCH] PollHandler: Ensure that m_pollStartEvent is always initialized to null Otherwise it may be undefined, and we DO create default-constructed PollHandler. For example, one is used as a fallback poll object in NeoChatRoom::poll. This is blind fix for a pretty nasty poll-related crash we saw a few months ago. BUG: 493649 --- src/pollhandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pollhandler.h b/src/pollhandler.h index d50c7b9e8..c19980348 100644 --- a/src/pollhandler.h +++ b/src/pollhandler.h @@ -91,7 +91,7 @@ Q_SIGNALS: void hasEndedChanged(); private: - const Quotient::PollStartEvent *m_pollStartEvent; + const Quotient::PollStartEvent *m_pollStartEvent = nullptr; void updatePoll(Quotient::RoomEventsRange events);