diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-01-24 19:32:26 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-01-24 19:32:26 +0000 |
commit | cc9f2aa0bcd7ea83aaea39d701d5c676c9fd57fd (patch) | |
tree | e002e050ddc00b427e748e9f9d10fb66160bf92e /eglib/gmain.c | |
parent | 3ff37c86508033361fc1be271fd9895f3162ee03 (diff) |
Make eglib g_io_channel_unref behave as its glib counterpart with respect to a NULL parameter
Diffstat (limited to 'eglib/gmain.c')
-rw-r--r-- | eglib/gmain.c | 4 |
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) |