Skip to content

Commit

Permalink
avoid null pointer use
Browse files Browse the repository at this point in the history
  • Loading branch information
satbaby authored and Frankenstone committed Sep 5, 2024
1 parent f8d0652 commit 9a37a4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/eitd/xmlutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,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);
Expand Down

0 comments on commit 9a37a4c

Please sign in to comment.