Fix crash in tdehwlib if not exists /sys/devices/system/cpu

This resolves Bug 2584

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit f4fb3a8e71)
pull/16/head
Slávek Banko 9 years ago
parent 111cc009ea
commit fd96a6c2a8

@ -3543,6 +3543,7 @@ void TDEHardwareDevices::addCoreSystemDevices() {
TQDir d("/sys/devices/system/cpu/");
d.setFilter( TQDir::Dirs );
const TQFileInfoList *list = d.entryInfoList();
if (list) {
TQFileInfoListIterator it( *list );
TQFileInfo *fi;
while ((fi = it.current()) != 0) {
@ -3559,6 +3560,7 @@ void TDEHardwareDevices::addCoreSystemDevices() {
}
++it;
}
}
// Populate CPU information
processModifiedCPUs();

Loading…
Cancel
Save