From a55d42562f9468cc056790cf09f50a3c525ead66 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 10 Dec 2004 03:32:35 +0000 Subject: [PATCH] crash fix SVN revision: 12431 --- src/bin/e_border.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/bin/e_border.c b/src/bin/e_border.c index b248be577..e25ade2bf 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -1575,8 +1575,15 @@ _e_border_eval(E_Border *bd) int new_x, new_y; printf("AUTO POS!\n"); - new_x = rand() % (bd->container->w - bd->w); - new_y = rand() % (bd->container->h - bd->h); + if (bd->container->w > bd->w) + new_x = rand() % (bd->container->w - bd->w); + else + new_x = 0; + if (bd->container->h > bd->h) + new_y = rand() % (bd->container->h - bd->h); + else + new_y = 0; + skiplist = evas_list_append(skiplist, bd); e_place_container_region_smart(bd->container, skiplist, bd->x, bd->y, bd->w, bd->h,