diff --git a/src/widgets/window.cpp b/src/widgets/window.cpp index d90d31182..c5f84dc64 100644 --- a/src/widgets/window.cpp +++ b/src/widgets/window.cpp @@ -32,6 +32,10 @@ Window::Window(WindowType _type) auto app = getApp(); app->accounts->Twitch.currentUserChanged.connect([this] { + if (this->userLabel == nullptr) { + return; + } + auto user = getApp()->accounts->Twitch.getCurrent(); if (user->isAnon()) { diff --git a/src/widgets/window.hpp b/src/widgets/window.hpp index 702bd9463..75c3b2cd1 100644 --- a/src/widgets/window.hpp +++ b/src/widgets/window.hpp @@ -42,7 +42,7 @@ protected: bool event(QEvent *event) override; private: - RippleEffectLabel *userLabel; + RippleEffectLabel *userLabel = nullptr; WindowType type; float dpi;