]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_motd.cpp
Avoid calling methods on NULL pointers wherever possible.
[user/henk/code/inspircd.git] / src / commands / cmd_motd.cpp
index 8e227723ee57f0bcca916fd1f66e85a4a6dcb241..869a9c3538652af4775da4791b742b4d325a26bf 100644 (file)
@@ -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");