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, 17 Dec 2010 19:43:34 +0000 (19:43 +0000)
src/extchat.c

index 368f0f4e00592676a6773c067ab7b505f4b237d3..5f43962a3f3f39c218afe70ea43a1e2fe915466e 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;
   }