diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-28 06:48:13 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-28 06:48:13 +0100 |
commit | 0b265b5d8cf04c0d0f8b9d6e1bd613527d45f699 (patch) | |
tree | e1f5b87baaa6f25bf7d43585d42122564f3881fc /FICS | |
parent | d6a42c0544b127cb6f596c5aa0db5e6370474711 (diff) |
ShowRankLines: more null checks
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/ratings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FICS/ratings.c b/FICS/ratings.c index ca05908..c0f5264 100644 --- a/FICS/ratings.c +++ b/FICS/ratings.c @@ -1736,15 +1736,15 @@ ShowRankLines(int p, FILE *fb, FILE *fs, FILE *fw, int bCount, int sCount, DisplayRankHead(p, show); for (int i = 0; i < n && show; i++) { - if (CheckFlag(show, SHOW_BLITZ)) { + if (fb != NULL && CheckFlag(show, SHOW_BLITZ)) { bCount += ShowRankEntry(p, fb, bCount, showComp, target, &lastBlitz, &nTiedBlitz); } - if (CheckFlag(show, SHOW_STANDARD)) { + if (fs != NULL && CheckFlag(show, SHOW_STANDARD)) { sCount += ShowRankEntry(p, fs, sCount, showComp, target, &lastStd, &nTiedStd); } - if (CheckFlag(show, SHOW_WILD)) { + if (fw != NULL && CheckFlag(show, SHOW_WILD)) { wCount += ShowRankEntry(p, fw, wCount, showComp, target, &lastWild, &nTiedWild); } |