From 757ddb5c6ab34cf38944c1ae8966f8c061125b5f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 26 Sep 2023 20:36:04 +0300 Subject: [PATCH 45/45] Support null players at pplayers_at_war() See osdn #48734 Signed-off-by: Marko Lindqvist --- common/player.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/player.c b/common/player.c index c4f68f4b9e..52858b97be 100644 --- a/common/player.c +++ b/common/player.c @@ -1369,6 +1369,10 @@ bool pplayers_at_war(const struct player *pplayer, { enum diplstate_type ds; + if (pplayer == nullptr || pplayer2 == nullptr) { + return TRUE; + } + if (pplayer == pplayer2) { return FALSE; } -- 2.40.1