From: Ray Strode Date: Thu, 7 Aug 2008 02:24:08 +0000 (-0400) Subject: Add some precondition checks to an api entry point X-Git-Tag: 0.6.0~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb050bd56484d0053e10c9fa028a3b93b333f894;p=thirdparty%2Fplymouth.git Add some precondition checks to an api entry point ply_event_loop_stop_watching_fd wasn't ensuring that the caller passes non-NULL arguments. --- diff --git a/src/libply/ply-event-loop.c b/src/libply/ply-event-loop.c index 2be07cde..0f313851 100644 --- a/src/libply/ply-event-loop.c +++ b/src/libply/ply-event-loop.c @@ -715,6 +715,9 @@ ply_event_loop_stop_watching_fd (ply_event_loop_t *loop, ply_event_destination_t *destination; ply_event_source_t *source; + assert (loop != NULL); + assert (watch != NULL); + destination = ply_event_loop_get_destination_from_fd_watch (loop, watch); assert (destination != NULL);