only suppy an id for devices supplying the system

This commit is contained in:
Richard Hughes 2008-07-25 17:17:22 +01:00
parent 4a15e42c41
commit d7447437dd

View file

@ -548,6 +548,10 @@ devkit_power_source_get_id (DevkitPowerSource *source)
GString *string; GString *string;
gchar *id = NULL; gchar *id = NULL;
/* only valid for devices supplying the system */
if (!source->priv->power_supply)
return id;
/* only valid for batteries */ /* only valid for batteries */
if (source->priv->type != DEVKIT_POWER_TYPE_BATTERY) if (source->priv->type != DEVKIT_POWER_TYPE_BATTERY)
return id; return id;