Ticket #5128: libs_libmythtv_dvbsignalmonitor.cpp-always-check-dyn_cast.patch

File libs_libmythtv_dvbsignalmonitor.cpp-always-check-dyn_cast.patch, 724 bytes (added by Erik Hovland <erik@…>, 12 years ago)

check dynamic_cast

  • libs/libmythtv/dvbsignalmonitor.cpp

    Always check dyn_cast
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmythtv/dvbsignalmonitor.cpp |    3 +++
     1 files changed, 3 insertions(+), 0 deletions(-)
    
    diff --git a/libs/libmythtv/dvbsignalmonitor.cpp b/libs/libmythtv/dvbsignalmonitor.cpp
    index 33b7579..ce6e09c 100644
    a b void DVBSignalMonitor::SetRotorTarget(float target) 
    133133void DVBSignalMonitor::GetRotorStatus(bool &was_moving, bool &is_moving)
    134134{
    135135    DVBChannel *dvbchannel = dynamic_cast<DVBChannel*>(channel);
     136    if (!dvbchannel)
     137        return;
     138
    136139    const DiSEqCDevRotor *rotor = dvbchannel->GetRotor();
    137140
    138141    QMutexLocker locker(&statusLock);