# HG changeset patch # User Timo Sirainen # Date 1139146403 -7200 # Node ID 9099825aac9adff3b95a284cd85ee61d960191c0 # Parent dd389a88138058a7dd5a45820892aef84cf11752 Don't crash if we couldn't add I/O notifier. diff -r dd389a881380 -r 9099825aac9a src/lib/ioloop.c --- a/src/lib/ioloop.c Sun Feb 05 15:07:16 2006 +0200 +++ b/src/lib/ioloop.c Sun Feb 05 15:33:23 2006 +0200 @@ -50,9 +50,10 @@ i_assert(callback != NULL); io = io_loop_notify_add(current_ioloop, path, callback, context); - if (io != NULL) - io->condition |= IO_NOTIFY; + if (io == NULL) + return NULL; + io->condition |= IO_NOTIFY; io->next = current_ioloop->notifys; current_ioloop->notifys = io;