aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/notifier.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/notifier.c b/src/notifier.c
index c091f73..30285d3 100644
--- a/src/notifier.c
+++ b/src/notifier.c
@@ -438,11 +438,10 @@ indicator_power_notifier_set_bus (IndicatorPowerNotifier * self,
p->bus = g_object_ref (bus);
error = NULL;
- g_dbus_interface_skeleton_export(skel,
- bus,
- BUS_PATH"/Battery",
- &error);
- if (error != NULL)
+ if (!g_dbus_interface_skeleton_export(skel,
+ bus,
+ BUS_PATH"/Battery",
+ &error))
{
g_warning ("Unable to export LowBattery properties: %s", error->message);
g_error_free (error);