diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-12 23:50:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-12 23:50:57 +0300 |
commit | 99ecd9ba734a308ae374d4494856d8bb3617f8a0 (patch) | |
tree | e0c8e93d963e2cfbcbcb4dd62922ab68a38a9378 /src/actions/chat.cpp | |
parent | ac04d602f1d68c5de7c50b69c2038e2110eab3bb (diff) | |
download | plus-99ecd9ba734a308ae374d4494856d8bb3617f8a0.tar.gz plus-99ecd9ba734a308ae374d4494856d8bb3617f8a0.tar.bz2 plus-99ecd9ba734a308ae374d4494856d8bb3617f8a0.tar.xz plus-99ecd9ba734a308ae374d4494856d8bb3617f8a0.zip |
Fix "invite to guild" from context menu.
Diffstat (limited to 'src/actions/chat.cpp')
-rw-r--r-- | src/actions/chat.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index 25ddb4e92..f8cb0731d 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -385,7 +385,7 @@ impHandler(party) impHandler(guild) { - if (!guildHandler || !event.tab || !localPlayer) + if (!guildHandler || !localPlayer) return false; const std::string args = event.args; @@ -406,9 +406,18 @@ impHandler(guild) } else { - // TRANSLATORS: guild invite message - event.tab->chatLog(_("Please specify a name."), - ChatMsgType::BY_SERVER); + if (event.tab) + { + // TRANSLATORS: guild invite message + event.tab->chatLog(_("Please specify a name."), + ChatMsgType::BY_SERVER); + } + else if (localChatTab) + { + // TRANSLATORS: guild invite message + localChatTab->chatLog(_("Please specify a name."), + ChatMsgType::BY_SERVER); + } } return true; } |