summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-01-24 19:32:26 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-01-24 19:32:26 +0000
commitcc9f2aa0bcd7ea83aaea39d701d5c676c9fd57fd (patch)
treee002e050ddc00b427e748e9f9d10fb66160bf92e
parent3ff37c86508033361fc1be271fd9895f3162ee03 (diff)
Make eglib g_io_channel_unref behave as its glib counterpart with respect to a NULL parameter
-rw-r--r--eglib/gmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eglib/gmain.c b/eglib/gmain.c
index 8375cd9a..037bdd26 100644
--- a/eglib/gmain.c
+++ b/eglib/gmain.c
@@ -150,10 +150,10 @@ void g_io_channel_close(GIOChannel *channel)
void g_io_channel_unref(GIOChannel *channel)
{
- if (--channel->ref_count > 0)
+ if (!channel)
return;
- if (!channel)
+ if (--channel->ref_count > 0)
return;
if (channel->close_on_unref && channel->fd >= 0)