summaryrefslogtreecommitdiff
path: root/config/dbus-core.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-01-25 13:54:47 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-01-25 13:54:47 +1030
commitd23266522390a4ef7203ae7c062b2b920e45f9d7 (patch)
tree3ed00007487cc6665dfda0f06ca1b634115d424f /config/dbus-core.c
parentfb07fab2c07e7b0834724541dc47bfba02ba8574 (diff)
config: check connection != NULL before getting dbus' dispatch status.
Diffstat (limited to 'config/dbus-core.c')
-rw-r--r--config/dbus-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/dbus-core.c b/config/dbus-core.c
index 9cf153076..b349c6e3c 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -56,8 +56,9 @@ wakeup_handler(pointer data, int err, pointer read_mask)
if (info->connection && FD_ISSET(info->fd, (fd_set *) read_mask)) {
do {
dbus_connection_read_write_dispatch(info->connection, 0);
- } while (dbus_connection_get_dispatch_status(info->connection) ==
- DBUS_DISPATCH_DATA_REMAINS);
+ } while (info->connection &&
+ dbus_connection_get_is_connected(info->connection) &&
+ dbus_connection_get_dispatch_status(info->connection) == DBUS_DISPATCH_DATA_REMAINS);
}
}