mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-12 13:00:01 -08:00
Fix #684
In 2 local games you can be disconnected from the server, so getUserListsTab() can return 0
This commit is contained in:
parent
030b02345d
commit
161cef29ad
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
|
|||
senderFormat.setAnchor(true);
|
||||
senderFormat.setAnchorHref("user://" + QString::number(userLevel) + "_" + sender);
|
||||
if (!sameSender) {
|
||||
if (!sender.isEmpty()) {
|
||||
if (!sender.isEmpty() && tabSupervisor->getUserListsTab()) {
|
||||
const int pixelSize = QFontInfo(cursor.charFormat().font()).pixelSize();
|
||||
QMap<QString, UserListTWI *> buddyList = tabSupervisor->getUserListsTab()->getBuddyList()->getUsers();
|
||||
cursor.insertImage(UserLevelPixmapGenerator::generatePixmap(pixelSize, userLevel, buddyList.contains(sender)).toImage());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue