From e84417293df7e362296ebf2766a67d7ce4c61dea Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sat, 4 Oct 2008 13:20:25 +0000 Subject: [PATCH] fix crash on show tuner informatio --- lib/dvb/frontend.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index 8bfe4858..bfb82a92 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -1276,14 +1276,15 @@ void eDVBFrontend::getTransponderData(ePyObject dest, bool original) case feTerrestrial: { FRONTENDPARAMETERS front; - if (!original) + if (m_fd == -1 && !original) + original = true; + else if (ioctl(m_fd, FE_GET_FRONTEND, &front)<0) { - if (!m_simulate && m_fd != -1 && ioctl(m_fd, FE_GET_FRONTEND, &front)<0) - eDebug("FE_GET_FRONTEND (%m)"); + eDebug("FE_GET_FRONTEND failed (%m)"); + original = true; } - else { - const FRONTENDPARAMETERS &parm = original ? this->parm : front; + const FRONTENDPARAMETERS &parm = original || m_simulate ? this->parm : front; const char *tmp = "INVERSION_AUTO"; switch(parm_inversion) { -- 2.30.2