summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-09-20 23:22:24 (GMT)
committerAaron Plattner <aplattner@nvidia.com>2007-09-20 23:22:24 (GMT)
commit3a965fdadccea7beff09a28c9c0ef4b4975eae38 (patch)
tree3ab6c0ac348f2f84432a89913830b0586894e0af
parent50fa8722d35c12e5f0322cebe25faf99c39d4f50 (diff)
Don't segfault on shutdown if we never managed to connect to dbus.
-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 2888159..eab72a5 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;