summaryrefslogtreecommitdiffstats
path: root/gatchat/gatchat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gatchat/gatchat.c')
-rw-r--r--gatchat/gatchat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index fc289198..ac45890b 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -1000,7 +1000,8 @@ gboolean g_at_chat_set_debug(GAtChat *chat,
chat->debugf = func;
chat->debug_data = user_data;
- g_at_io_set_debug(chat->io, func, user_data);
+ if (chat->io)
+ g_at_io_set_debug(chat->io, func, user_data);
return TRUE;
}