avoid possible segfault

This commit is contained in:
TangoCash
2021-09-14 16:38:57 +02:00
committed by Thilo Graf
parent a892d20aac
commit f8d3c34307

View File

@@ -676,10 +676,13 @@ void *insertEventsfromXMLTV(void * data)
readEventsFromXMLTV(url, ev_count); readEventsFromXMLTV(url, ev_count);
} }
else if (::downloadUrl(url, tmp_name)) else if (::downloadUrl(url, tmp_name))
{
if (!access(tmp_name.c_str(), R_OK))
{ {
readEventsFromXMLTV(tmp_name, ev_count); readEventsFromXMLTV(tmp_name, ev_count);
remove(tmp_name.c_str()); remove(tmp_name.c_str());
} }
}
else else
{ {
reader_ready = true; reader_ready = true;