From d7447437dd1d2bc722a2bc746d9af2fb8b9a1a28 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 25 Jul 2008 17:17:22 +0100 Subject: [PATCH] only suppy an id for devices supplying the system --- src/devkit-power-source.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/devkit-power-source.c b/src/devkit-power-source.c index c94e632..b205f52 100644 --- a/src/devkit-power-source.c +++ b/src/devkit-power-source.c @@ -548,6 +548,10 @@ devkit_power_source_get_id (DevkitPowerSource *source) GString *string; gchar *id = NULL; + /* only valid for devices supplying the system */ + if (!source->priv->power_supply) + return id; + /* only valid for batteries */ if (source->priv->type != DEVKIT_POWER_TYPE_BATTERY) return id;