From a46c7156ddee54cc06baf588c1417641ff576cd2 Mon Sep 17 00:00:00 2001 From: ctrlaltca Date: Tue, 25 Apr 2017 18:13:45 +0200 Subject: [PATCH] fix_crash (#2649) --- cockatrice/src/tab_supervisor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/tab_supervisor.cpp b/cockatrice/src/tab_supervisor.cpp index c541f02a..c53f4eea 100644 --- a/cockatrice/src/tab_supervisor.cpp +++ b/cockatrice/src/tab_supervisor.cpp @@ -613,7 +613,7 @@ bool TabSupervisor::isOwnUserRegistered() const QString TabSupervisor::getOwnUsername() const { - return QString::fromStdString(userInfo->name()); + return userInfo ? QString::fromStdString(userInfo->name()) : QString(); } bool TabSupervisor::isUserBuddy(const QString &userName) const