Don't lookup_player() a NULL string
authorAri Johnson <ari@theari.com>
Fri, 17 Dec 2010 19:43:34 +0000 (19:43 +0000)
committerAri Johnson <ari@theari.com>
Fri, 22 May 2009 15:04:49 +0000 (15:04 +0000)
(cherry picked from commit 6f4efa010b94984347112fa65e89469dd7bfc1bf)

src/extchat.c

index 31f7eeb379afca51a51799e4f937033ee8817009..7fba5d272515395337a703437afc7fedc537e350 100644 (file)
@@ -2584,7 +2584,7 @@ do_chan_chown(dbref player, const char *name, const char *newowner)
   /* Find the channel */
   test_channel(player, name, c);
   /* Find the victim */
-  if ((victim = lookup_player(newowner)) == NOTHING) {
+  if (!newowner || (victim = lookup_player(newowner)) == NOTHING) {
     notify(player, T("CHAT: Invalid owner."));
     return;
   }