diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-07-24 15:17:32 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-07-24 15:17:32 -0500 |
commit | 62a35de9ca05c71d98680b1e49c2c345a498acda (patch) | |
tree | 0b60253a7d8ad9f11f77b7bc0491634b771388a6 | |
parent | 11784e2e354b5538b6fbccd9df1e6259c9ebc6f0 (diff) | |
download | ayatana-indicator-power-62a35de9ca05c71d98680b1e49c2c345a498acda.tar.gz ayatana-indicator-power-62a35de9ca05c71d98680b1e49c2c345a498acda.tar.bz2 ayatana-indicator-power-62a35de9ca05c71d98680b1e49c2c345a498acda.zip |
check the return value of g_dbus_interface_skeleton_export() directly instead of indirectly testing to see if the GError it used is nonnull.
-rw-r--r-- | src/notifier.c | 9 |
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); |