From 88c112cde83285ec9f72f0413c12e5532139ba2f Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Wed, 10 Feb 1999 08:06:30 +0000 Subject: asure that ->value_buf always points to an allocated area. Wed Feb 10 08:35:36 1999 Tim Janik * gtk/gtkcolorsel.c (gtk_color_selection_draw_value_bar): asure that ->value_buf always points to an allocated area. (gtk_color_selection_drag_end): new function hooked up to drag_end to destroy the drag_window. * gtk/gtkdnd.c: some coding style fixups. Wed Feb 10 06:47:17 1999 Tim Janik * gdk/gdkwindow.c: various indentation fixes. * gdk/gdkevents.c: coding style fixups. NULL initialize event_func, event_notify and event_chunk. (expose_predicate): made this function static. (gdk_event_handler_set): perform destroy notification even if no event_func is set. * gdk/gdkrectangle.c (gdk_rectangle_union): added g_return_if_fail statements. --- gdk/gdkrectangle.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gdk/gdkrectangle.c') diff --git a/gdk/gdkrectangle.c b/gdk/gdkrectangle.c index e1d1d300fa..04017a99eb 100644 --- a/gdk/gdkrectangle.c +++ b/gdk/gdkrectangle.c @@ -25,12 +25,14 @@ gdk_rectangle_union (GdkRectangle *src1, GdkRectangle *src2, GdkRectangle *dest) { + g_return_if_fail (src1 != NULL); + g_return_if_fail (src2 != NULL); + g_return_if_fail (dest != NULL); + dest->x = MIN (src1->x, src2->x); dest->y = MIN (src1->y, src2->y); - dest->width = - MAX (src1->x + src1->width, src2->x + src2->width) - dest->x; - dest->height = - MAX (src1->y + src1->height, src2->y + src2->height) - dest->y; + dest->width = MAX (src1->x + src1->width, src2->x + src2->width) - dest->x; + dest->height = MAX (src1->y + src1->height, src2->y + src2->height) - dest->y; } gint -- cgit v1.2.1