From 7cd2d775243705544c37e19ce11a7726dd701278 Mon Sep 17 00:00:00 2001 From: fourtf Date: Wed, 6 Jun 2018 20:11:07 +0200 Subject: [PATCH] fixed window title not containing the username on linux --- src/widgets/window.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/widgets/window.cpp b/src/widgets/window.cpp index cb8c3e16..9f2d2b2b 100644 --- a/src/widgets/window.cpp +++ b/src/widgets/window.cpp @@ -34,20 +34,20 @@ 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()) { this->refreshWindowTitle("Not logged in"); - this->userLabel->getLabel().setText("anonymous"); + if (this->userLabel) { + this->userLabel->getLabel().setText("anonymous"); + } } else { this->refreshWindowTitle(user->getUserName()); - this->userLabel->getLabel().setText(user->getUserName()); + if (this->userLabel) { + this->userLabel->getLabel().setText(user->getUserName()); + } } });