summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-09-20 16:22:24 -0700
committerAaron Plattner <aplattner@nvidia.com>2007-09-20 16:22:24 -0700
commit3a965fdadccea7beff09a28c9c0ef4b4975eae38 (patch)
tree3ab6c0ac348f2f84432a89913830b0586894e0af /config
parent50fa8722d35c12e5f0322cebe25faf99c39d4f50 (diff)
Don't segfault on shutdown if we never managed to connect to dbus.
Diffstat (limited to 'config')
-rw-r--r--config/dbus-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/dbus-core.c b/config/dbus-core.c
index 28881596f..eab72a530 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -87,7 +87,8 @@ teardown(void)
dbus_connection_unref(bus_info.connection);
RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
- RemoveGeneralSocket(bus_info.fd);
+ if (bus_info.fd != -1)
+ RemoveGeneralSocket(bus_info.fd);
bus_info.fd = -1;
bus_info.connection = NULL;