fixed crash if number of dvb devices changes

This commit is contained in:
louis 2015-03-22 08:33:51 +01:00
parent 9c93fbc072
commit 03f3789ee9
2 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@
#include "viewhelpers.h" #include "viewhelpers.h"
cViewHelpers::cViewHelpers(void) { cViewHelpers::cViewHelpers(void) {
numDevices = 0;
devicesInit = false; devicesInit = false;
lastSecond = -1; lastSecond = -1;
lastMinute = -1; lastMinute = -1;
@ -36,7 +37,6 @@ bool cViewHelpers::SetDevices(bool initial, map<string,int> *intTokens, vector<m
#ifdef DOPROFILE #ifdef DOPROFILE
cStopWatch watch("SetDevices"); cStopWatch watch("SetDevices");
#endif #endif
int numDevices = cDevice::NumDevices();
if (!initial) { if (!initial) {
//check if drawing is necessary //check if drawing is necessary
bool changed = false; bool changed = false;

View File

@ -3,6 +3,7 @@
class cViewHelpers { class cViewHelpers {
private: private:
int numDevices;
bool devicesInit; bool devicesInit;
int* lastSignalStrength; int* lastSignalStrength;
int* lastSignalQuality; int* lastSignalQuality;