diff --git a/src/laws.c b/src/laws.c index ba5466fda..549acb2b2 100755 --- a/src/laws.c +++ b/src/laws.c @@ -1622,7 +1622,7 @@ bool renamed_building(const building * b) static int rename_cmd(unit * u, order * ord, char **s, const char *s2) { - if (!s2[0]) { + if (!s2 || !s2[0]) { cmistake(u, ord, 84, MSG_EVENT); return 0; } diff --git a/src/laws.test.c b/src/laws.test.c index c7c3bf632..7b733b9cf 100644 --- a/src/laws.test.c +++ b/src/laws.test.c @@ -1135,7 +1135,7 @@ CuSuite *get_laws_suite(void) SUITE_ADD_TEST(suite, test_mail_faction_no_msg); SUITE_ADD_TEST(suite, test_mail_region_no_msg); SUITE_ADD_TEST(suite, test_mail_faction_no_target); - (void)test_luck_message; /* disabled, breaks on travis */ + SUITE_ADD_TEST(suite, test_luck_message); return suite; }