coverity CID 215803 Dereference after null check

This commit is contained in:
Enno Rehling 2020-12-13 14:49:34 +01:00
parent 6bba2a2ed7
commit da83e3f2f6

View file

@ -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);
}