From da83e3f2f69416de66fe92389e16996bc5a7e194 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 13 Dec 2020 14:49:34 +0100 Subject: [PATCH] coverity CID 215803 Dereference after null check --- src/study.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/study.c b/src/study.c index e41d9185d..e529c2c31 100644 --- a/src/study.c +++ b/src/study.c @@ -658,7 +658,7 @@ int study_cmd(unit * u, order * ord) ADDMSG(&u->faction->msgs, msg_message("studycost", "unit region cost skill", u, u->region, money, sk)); } - if (a != NULL) { + if (teach != NULL) { if (teach->teachers) { msg_teachers(teach->teachers, u, sk); }