Prevent the libparted backend from exposing "null devices"

REVIEW: 129968
BUG: 375394
This commit is contained in:
Alexander Schlarb 2017-02-25 13:45:22 +00:00 committed by Andrius Štikonas
parent 876a3932fd
commit 427e37a047
1 changed files with 4 additions and 1 deletions

View File

@ -441,7 +441,10 @@ QList<Device*> LibPartedBackend::scanDevices(bool excludeReadOnly)
}
emitScanProgress(devices[i], i * 100 / totalDevices);
result.append(scanDevice(devices[i]));
Device* device = scanDevice(devices[i]);
if(device != nullptr) {
result.append(device);
}
}
}