- Absturz in gm tell unit

This commit is contained in:
Christian Schlittchen 2002-03-12 19:36:59 +00:00
parent 46fee73d57
commit ba95eb0be1
1 changed files with 8 additions and 1 deletions

View File

@ -404,7 +404,14 @@ gm_messageunit(const char * str, void * data, const char * cmd)
const struct plane * p = rplane(u->region); const struct plane * p = rplane(u->region);
unit * target = findunit(atoi36(igetstrtoken(str))); unit * target = findunit(atoi36(igetstrtoken(str)));
const char * msg = getstrtoken(); const char * msg = getstrtoken();
region * r = target->region; region * r;
if (target == NULL) {
cmistake(u, cmd, 63, MSG_EVENT);
return;
}
r = target->region;
if (r==NULL || p!=rplane(r)) { if (r==NULL || p!=rplane(r)) {
mistake(u, cmd, "In diese Region kann keine Nachricht gesandt werden.\n", 0); mistake(u, cmd, "In diese Region kann keine Nachricht gesandt werden.\n", 0);