From e295dea5cd695b716d2617b8949da992ebdab71c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 12 Dec 2014 21:06:58 +0300 Subject: Fix player relation manu actions. --- src/actions/commands.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/actions') diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 00c8b9a5c..eb10e8a77 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -101,19 +101,19 @@ static void changeRelation(const InputEvent &event, const PlayerRelation::Relation relation, const std::string &relationText) { - if (!event.tab) - return; - std::string args = getNick(event); if (args.empty()) return; if (player_relations.getRelation(args) == relation) { - // TRANSLATORS: change relation - event.tab->chatLog(strprintf(_("Player already %s!"), - relationText.c_str()), ChatMsgType::BY_SERVER); - return; + if (event.tab) + { + // TRANSLATORS: change relation + event.tab->chatLog(strprintf(_("Player already %s!"), + relationText.c_str()), ChatMsgType::BY_SERVER); + return; + } } else { -- cgit v1.2.3-70-g09d2