diff options
author | Tim Janik <timj@gtk.org> | 1999-02-10 08:06:30 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1999-02-10 08:06:30 +0000 |
commit | 88c112cde83285ec9f72f0413c12e5532139ba2f (patch) | |
tree | ae42f6c998a0c021381540a13b6afa198d50ecbe /gdk/gdkrectangle.c | |
parent | d1bda8d56232ff0431796add4029e129f877fd6a (diff) | |
download | gtk+-88c112cde83285ec9f72f0413c12e5532139ba2f.tar.gz |
asure that ->value_buf always points to an allocated area.
Wed Feb 10 08:35:36 1999 Tim Janik <timj@gtk.org>
* 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 <timj@gtk.org>
* 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.
Diffstat (limited to 'gdk/gdkrectangle.c')
-rw-r--r-- | gdk/gdkrectangle.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 |