From 08f5a7bd4d62c3aae459b59a02eb927001d4fdbb Mon Sep 17 00:00:00 2001 From: Ihor Kalnytskyi Date: Fri, 25 Aug 2023 23:41:10 +0300 Subject: [PATCH] UI: Fix crash in YoutubeAuth YoutubeAuth::chat is a raw pointer that is uninitialized. Most of the time it doesn't matter, since the object it points to is created at the application start. However, in case of Wayland (Linux), CEF is not initialized (because it's not supported) and the chat object will never get created. This patch fixes crash on Wayland by initializing `chat` to `nullptr`. Co-authored-by: Roman Podoliaka --- UI/auth-youtube.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/auth-youtube.hpp b/UI/auth-youtube.hpp index 5c5015def..28e17148d 100644 --- a/UI/auth-youtube.hpp +++ b/UI/auth-youtube.hpp @@ -44,7 +44,7 @@ class YoutubeAuth : public OAuthStreamKey { std::string section; #ifdef BROWSER_AVAILABLE - YoutubeChatDock *chat; + YoutubeChatDock *chat = nullptr; #endif virtual bool RetryLogin() override;