Nullpointer removed

This commit is contained in:
2018-06-07 08:30:37 +02:00
parent 6632cb4d9a
commit 70f0b6f94a
2 changed files with 2 additions and 2 deletions

View File

@ -195,7 +195,7 @@ string read_line(FILE* file) {
char *line = nullptr;
size_t len = 0;
ssize_t read;
if ((read = getline(&line, &len, file)) < 0) {
if ((read = getline(&line, &len, file)) < 0 || line == nullptr) {
return "";
}
string l = string(line);