[gnome-settings-daemon] xrandr: Fix warning on exit
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xrandr: Fix warning on exit
- Date: Fri, 14 Oct 2016 13:15:53 +0000 (UTC)
commit 4c76f0bff8f78fca0830138ffe2d0e7acf4cfb87
Author: Bastien Nocera <hadess hadess net>
Date: Thu Oct 13 12:13:12 2016 +0200
xrandr: Fix warning on exit
If _stop() is called twice, we would pass an already freed ID to
g_bus_unown_name().
gsd-xrandr[1874]: Invalid id 1 passed to g_bus_unown_name()
plugins/xrandr/gsd-xrandr-manager.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 06906a9..c31976b 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -1289,8 +1289,10 @@ gsd_xrandr_manager_stop (GsdXrandrManager *manager)
manager->priv->upower_client = NULL;
}
- if (manager->priv->name_id != 0)
+ if (manager->priv->name_id != 0) {
g_bus_unown_name (manager->priv->name_id);
+ manager->priv->name_id = 0;
+ }
if (manager->priv->introspection_data) {
g_dbus_node_info_unref (manager->priv->introspection_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]