aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/gamedb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c
index e436cab..27c7d6c 100644
--- a/FICS/gamedb.c
+++ b/FICS/gamedb.c
@@ -88,9 +88,11 @@ PRIVATE char gameString[GAME_STRING_LEN];
PRIVATE int
get_empty_slot(void)
{
- for (int i = 0; i < g_num; i++) {
- if (garray[i].status == GAME_EMPTY)
- return i;
+ if (garray != NULL) {
+ for (int i = 0; i < g_num; i++) {
+ if (garray[i].status == GAME_EMPTY)
+ return i;
+ }
}
g_num++;