Commit a6860b99 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Don't crash SensorFaceControllerTest if we don't have StorageVolume

parent 4bcc11ab
......@@ -63,6 +63,10 @@ private Q_SLOTS:
const auto storageAccess = storageAccesses[i].as<Solid::StorageAccess>();
const auto blockDevice = storageAccesses[i].as<Solid::Block>();
const auto storageVolume = storageAccesses[i].as<Solid::StorageVolume>();
if (!storageVolume) {
continue;
}
const QString newPrefix = QStringLiteral("disk/") + (storageVolume->uuid().isEmpty() ? storageVolume->label() : storageVolume->uuid());
// Old code uses "disk/sdc2_(8:34)/..."
QString device = blockDevice->device().mid(strlen("/dev/"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment