diff options
Diffstat (limited to 'eglib')
-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) |