From 427e37a047898dad0ab8c54aea33473f7854e150 Mon Sep 17 00:00:00 2001 From: Alexander Schlarb Date: Sat, 25 Feb 2017 13:45:22 +0000 Subject: [PATCH] Prevent the libparted backend from exposing "null devices" REVIEW: 129968 BUG: 375394 --- src/plugins/libparted/libpartedbackend.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/libparted/libpartedbackend.cpp b/src/plugins/libparted/libpartedbackend.cpp index c5f912c..3c1283c 100644 --- a/src/plugins/libparted/libpartedbackend.cpp +++ b/src/plugins/libparted/libpartedbackend.cpp @@ -441,7 +441,10 @@ QList 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); + } } }