Commit 88e1ad8a authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

do not presume all storageaccess are also volumes

the> would potentially dereference a nullptr

notably I have a fstab entry for a cifs mount. that is a NetworkShare
and a StorageAccess but not a StorageVolume
parent 936a461d
Copyright (c) 2020 David Redondo <>
Copyright (c) 2020 Harald Sitter <>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
......@@ -187,8 +188,9 @@ DisksPlugin::~DisksPlugin()
void DisksPlugin::addDevice(const Solid::Device& device)
auto container = containers()[0];
const auto volume =<Solid::StorageVolume>();
auto access =<Solid::StorageAccess>();
if (!access ||<Solid::StorageVolume>()->isIgnored()) {
if (!access || !volume || volume->isIgnored()) {
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