summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--displaychannelview.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/HISTORY b/HISTORY
index 49924e2..3543d60 100644
--- a/HISTORY
+++ b/HISTORY
@@ -380,3 +380,4 @@ Version 1.0.0
- improved image scaling by using internal scaling libary from
Nikolaus Meine (thanks @Soeren Moch for providing the patch)
+- fixed a crash with dvb cards which deliver negative signal values
diff --git a/displaychannelview.c b/displaychannelview.c
index c7ab5f3..d4c219f 100644
--- a/displaychannelview.c
+++ b/displaychannelview.c
@@ -664,6 +664,8 @@ void cNopacityDisplayChannelView::DrawSignal(void) {
if (Now != lastSignalDisplay) {
int SignalStrength = cDevice::ActualDevice()->SignalStrength();
int SignalQuality = cDevice::ActualDevice()->SignalQuality();
+ if (SignalStrength < 0) SignalStrength = 0;
+ if (SignalQuality < 0) SignalQuality = 0;
if ((SignalStrength == 0)&&(SignalQuality==0))
return;
if ((lastSignalStrength != SignalStrength) || (lastSignalQuality != SignalQuality)) {