Don't segfault on shutdown if we never managed to connect to dbus.

(cherry picked from commit 3a965fdadc)
This commit is contained in:
Aaron Plattner 2007-09-20 16:22:24 -07:00 committed by Daniel Stone
parent eba45539af
commit ce55565ecd

View file

@ -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;