Re: Additional issues to address for the constraints_experiments branch?



On 11/16/05, Ray Strode <halfline gmail com> wrote:
> It segfaults unless I do something like this:

Yep, I suck.

> diff -u -p -r1.1.2.27 boxes.c
> --- boxes.c     16 Nov 2005 00:08:26 -0000      1.1.2.27
> +++ boxes.c     16 Nov 2005 22:03:30 -0000
> @@ -1266,6 +1266,10 @@ get_disjoint_strut_list_in_region (const
>                else
>                  tmp   = replace_rect_with_list (tmp,     cur_leftover);
>                compare = replace_rect_with_list (compare, comp_leftover);
> +
> +              if (!compare)
> +                break;
> +
>                cur = tmp->data;
>              }
>
> compare is supposed to be the non-overlapping part of one of the
> struts that overlap I think.  In my case the strut is completely
> within another strut which means it has no non-overlapping areas and
> so compare is NULL.

Thanks, I committed this patch and added a testcase to testboxes.c
that would explicitly catch this failure (I did have at least one
testcase before where struts were overlapping, but I didn't think to
test the completely overlapping case separately).  Keep the bug
reports coming.  :)

2005-11-16  Elijah Newren  <newren gmail com>

	* src/boxes.c (get_disjoint_strut_list_in_region): handle the case
	where one strut completely overlaps the other.  Patch from Ray
	Strode.

	* src/testboxes.c (get_strut_list, test_find_onscreen_edges):
	add a test case that would segfault without the above fix



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]