diff options
author | Peter Powell <petpow@saberuk.com> | 2014-10-08 16:34:37 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2014-10-13 06:18:14 +0100 |
commit | 6935ce2956fed99d5484da90e614b7126e5275d3 (patch) | |
tree | 35055bf79b871df09a988e6d1b005640b2f13101 /src/commands/cmd_motd.cpp | |
parent | 402a1bb010522a35600325c1a3084e092b40ca22 (diff) |
Avoid calling methods on NULL pointers wherever possible.
The trick we use to allow this is undefined behaviour and is not
liked by LLVM. We should stop using it but it has the potential to
break to many things for a minor release.
Diffstat (limited to 'src/commands/cmd_motd.cpp')
-rw-r--r-- | src/commands/cmd_motd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commands/cmd_motd.cpp b/src/commands/cmd_motd.cpp index 8e227723e..869a9c353 100644 --- a/src/commands/cmd_motd.cpp +++ b/src/commands/cmd_motd.cpp @@ -53,7 +53,7 @@ CmdResult CommandMotd::Handle (const std::vector<std::string>& parameters, User if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName) return CMD_SUCCESS; - ConfigTag* tag = NULL; + ConfigTag* tag = ServerInstance->Config->EmptyTag; if (IS_LOCAL(user)) tag = user->GetClass()->config; std::string motd_name = tag->getString("motd", "motd"); |