Permalink
Browse files

node: fix trivial warning

g_object_unref(NULL) complains. Blah.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information...
1 parent 87b0a31 commit 2dd9bce00547df4ad0e1b27ebfafdc53c5a5aba9 @felipec committed May 15, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 io/pn_node.c
View
@@ -464,7 +464,10 @@ close_impl (PnNode *conn)
}
#if defined(USE_GIO)
- g_object_unref(conn->socket_conn);
+ if (conn->socket_conn) {
+ g_object_unref(conn->socket_conn);
+ conn->socket_conn = NULL;
+ }
#elif defined(HAVE_LIBPURPLE)
if (conn->connect_data) {
purple_proxy_connect_cancel (conn->connect_data);

0 comments on commit 2dd9bce

Please sign in to comment.