infoviewer.cpp: prevent segfault if framebuffer is already deactivated in standby mode. (race condition)

Origin commit data
------------------
Branch: ni/coolstream
Commit: f883d5c82a
Author: GetAway <get-away@t-online.de>
Date: 2018-09-24 (Mon, 24 Sep 2018)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
GetAway
2018-09-24 15:00:14 +02:00
committed by vanhofen
parent 6b68112a42
commit ce660cf548

View File

@@ -1172,6 +1172,8 @@ void CInfoViewer::loop(bool show_dot)
res = messages_return::cancel_all; res = messages_return::cancel_all;
hideIt = true; hideIt = true;
} else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == sec_timer_id)) { } else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == sec_timer_id)) {
if (frameBuffer->getActive())
{
showSNR (); showSNR ();
//NI //NI
if (timeset) if (timeset)
@@ -1194,12 +1196,14 @@ void CInfoViewer::loop(bool show_dot)
{ {
std::string md5_tmp = filehash((char *)"/tmp/ecm.info"); std::string md5_tmp = filehash((char *)"/tmp/ecm.info");
//printf("CInfoViewer::loop() ecm.info.tmp = %s\nCInfoViewer::loop() ecm.info = %s\n",md5_ecmInfo.c_str(),md5_tmp.c_str()); //printf("CInfoViewer::loop() ecm.info.tmp = %s\nCInfoViewer::loop() ecm.info = %s\n",md5_ecmInfo.c_str(),md5_tmp.c_str());
if(md5_ecmInfo != md5_tmp) { if (md5_ecmInfo != md5_tmp)
{
puts("CInfoViewer::loop() CA reload"); puts("CInfoViewer::loop() CA reload");
infoViewerBB->paint_ca_icons(0); infoViewerBB->paint_ca_icons(0);
} }
} }
infoViewerBB->showIcon_Resolution(); infoViewerBB->showIcon_Resolution();
}
} else if ((msg == NeutrinoMessages::EVT_RECORDMODE) && } else if ((msg == NeutrinoMessages::EVT_RECORDMODE) &&
(CMoviePlayerGui::getInstance().timeshift) && (CRecordManager::getInstance()->GetRecordCount() == 1)) { (CMoviePlayerGui::getInstance().timeshift) && (CRecordManager::getInstance()->GetRecordCount() == 1)) {
res = CNeutrinoApp::getInstance()->handleMsg(msg, data); res = CNeutrinoApp::getInstance()->handleMsg(msg, data);