summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-12 23:50:57 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-12 23:50:57 +0300
commit99ecd9ba734a308ae374d4494856d8bb3617f8a0 (patch)
treee0c8e93d963e2cfbcbcb4dd62922ab68a38a9378 /src/actions
parentac04d602f1d68c5de7c50b69c2038e2110eab3bb (diff)
downloadManaVerse-99ecd9ba734a308ae374d4494856d8bb3617f8a0.tar.gz
ManaVerse-99ecd9ba734a308ae374d4494856d8bb3617f8a0.tar.bz2
ManaVerse-99ecd9ba734a308ae374d4494856d8bb3617f8a0.tar.xz
ManaVerse-99ecd9ba734a308ae374d4494856d8bb3617f8a0.zip
Fix "invite to guild" from context menu.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/chat.cpp17
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;
}