瀏覽代碼

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 <[email protected]>
Ihor Kalnytskyi 2 年之前
父節點
當前提交
08f5a7bd4d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      UI/auth-youtube.hpp

+ 1 - 1
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;