From: Mikel Astiz <[email protected]>
In case of error there might be no io channel to shutdown.
---
client/bluetooth.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/client/bluetooth.c b/client/bluetooth.c
index 3441d4b..558c408 100644
--- a/client/bluetooth.c
+++ b/client/bluetooth.c
@@ -269,9 +269,11 @@ static void search_callback(uint8_t type, uint16_t status,
}
failed:
- g_io_channel_shutdown(session->io, TRUE, NULL);
- g_io_channel_unref(session->io);
- session->io = NULL;
+ if (session->io != NULL) {
+ g_io_channel_shutdown(session->io, TRUE, NULL);
+ g_io_channel_unref(session->io);
+ session->io = NULL;
+ }
g_set_error(&gerr, OBC_BT_ERROR, -EIO,
"Unable to find service record");
--
1.7.6.5
Hi Mikel,
On Thu, Jan 26, 2012, Mikel Astiz wrote:
> In case of error there might be no io channel to shutdown.
> ---
> client/bluetooth.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
Applied. Thanks.
Johan