infoviewer: fix possible segfault

If no NEUTRINO_ICON_REC was defined, it will crash here.
Now 1st icon will be checked for availability and is used.
This error was observed on start of timeshift recording.


Origin commit data
------------------
Branch: ni/coolstream
Commit: ed4575ba11
Author: Thilo Graf <dbt@novatux.de>
Date: 2022-01-21 (Fri, 21 Jan 2022)



------------------
This commit was generated by Migit
This commit is contained in:
2022-01-21 23:44:35 +01:00
committed by vanhofen
parent 94158d4c07
commit a9ea9f312b

View File

@@ -322,10 +322,13 @@ void CInfoViewer::showRecordIcon (const bool show)
if (rec->isPainted())
{
if (rec->getCCItem(NEUTRINO_ICON_REC)->isPainted())
rec->getCCItem(NEUTRINO_ICON_REC)->kill();
else
rec->getCCItem(NEUTRINO_ICON_REC)->paint();
if (rec->getCCItem(0))
{
if (rec->getCCItem(0)->isPainted())
rec->getCCItem(0)->kill();
else
rec->getCCItem(0)->paint();
}
}
else
rec->paint();