]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Add some precondition checks to an api entry point
authorRay Strode <rstrode@redhat.com>
Thu, 7 Aug 2008 02:24:08 +0000 (22:24 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 7 Aug 2008 02:24:08 +0000 (22:24 -0400)
ply_event_loop_stop_watching_fd wasn't ensuring that
the caller passes non-NULL arguments.

src/libply/ply-event-loop.c

index 2be07cdea24cda48b020d26ce2df4a9ec532b493..0f313851dbbb06bd52e80de89f3c931b85d693d4 100644 (file)
@@ -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);