From 895239acf05077c7700875cb722e50bfa8b45ead Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 24 Feb 2009 17:50:04 +0200 Subject: Only call g_io_channel_shutdown if the connection was actually successfull --- input/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'input') diff --git a/input/device.c b/input/device.c index d9db92db..a41df177 100644 --- a/input/device.c +++ b/input/device.c @@ -734,7 +734,8 @@ failed: g_io_channel_shutdown(iconn->ctrl_io, FALSE, NULL); if (iconn->intr_io) { - g_io_channel_shutdown(iconn->intr_io, FALSE, NULL); + if (!conn_err) + g_io_channel_shutdown(iconn->intr_io, FALSE, NULL); g_io_channel_unref(iconn->intr_io); iconn->intr_io = NULL; } -- cgit