avoid null pointer use

This commit is contained in:
Jacek Jendrzej
2024-09-05 13:36:24 +02:00
parent 9ef2cea5d8
commit 929c5a40fb

View File

@@ -835,8 +835,10 @@ void writeEventsToFile(const char *epgdir)
}
(*e)->saveXML(eventfile);
}
write_epgxml_footer(eventfile);
fclose(eventfile);
if (eventfile != NULL) {
write_epgxml_footer(eventfile);
fclose(eventfile);
}
_done:
unlockEvents();
write_indexxml_footer(indexfile);