Skip to content

Commit

Permalink
fix nulpointer reference bij addcomputer message en speler niet in ee…
Browse files Browse the repository at this point in the history
…n game
  • Loading branch information
Marcus Klaas de Vries committed Jun 22, 2012
1 parent dbec351 commit 836432d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.c
Expand Up @@ -290,7 +290,7 @@ callback_game(struct libwebsocket_context * context,

/* NOTE: it is okay to not lock game here */

if(u->gm->host != u || u->gm->state != GS_LOBBY ||
if(!u->gm || u->gm->host != u || u->gm->state != GS_LOBBY ||
u->gm->nmax <= u->gm->n) {
warning("user %d tried to add computer, but does not meet reqs\n", u->id);
break;
Expand Down

0 comments on commit 836432d

Please sign in to comment.