summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/storage/plugins/UdisksStorage.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/storage/plugins/UdisksStorage.cxx b/src/storage/plugins/UdisksStorage.cxx
index 135489032..df2e937ae 100644
--- a/src/storage/plugins/UdisksStorage.cxx
+++ b/src/storage/plugins/UdisksStorage.cxx
@@ -138,9 +138,11 @@ UdisksStorage::OnListReply(ODBus::Message reply) noexcept
try {
ParseObjects(reply, [this](Object &&o) {
- if (o.IsId(id))
- dbus_path = std::move(o.path);
- });
+ if (!o.IsId(id))
+ return;
+
+ dbus_path = std::move(o.path);
+ });
if (dbus_path.empty())
throw FormatRuntimeError("No such UDisks2 object: %s",