Commit 766577bb authored by Michael Tremer's avatar Michael Tremer

tests: country: Don't crash when a country could not be found

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 245b33e2
......@@ -145,7 +145,7 @@ int main(int argc, char** argv) {
// Lookup an address in the subnet
err = loc_database_get_country(db, &country, "YY");
if (err) {
if (err || !country) {
fprintf(stderr, "Could not find country: YY\n");
exit(EXIT_FAILURE);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment