From 3c3687ad59aed79ce84b95722ea3139581c088b5 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Thu, 1 Jun 2017 22:12:07 +0200 Subject: [PATCH] devicemanager-proxy: check if there is a device associated with given path --- src/mconnect/devicemanager-proxy.vala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mconnect/devicemanager-proxy.vala b/src/mconnect/devicemanager-proxy.vala index 546ca7f..5682a5c 100644 --- a/src/mconnect/devicemanager-proxy.vala +++ b/src/mconnect/devicemanager-proxy.vala @@ -59,6 +59,11 @@ class DeviceManagerDBusProxy : Object var dev_proxy = this.devices.@get(path); + if (dev_proxy == null) { + warning("no device under path %s", path); + return; + } + this.manager.allow_device(dev_proxy.device); }