[PATCH] screenshooter: Properly handle multiple outputs.
Andreas Ericsson
ae at op5.se
Thu Apr 5 02:42:46 PDT 2012
On 04/04/2012 02:37 PM, Kristian Hoegsberg wrote:
> On Wed, Apr 04, 2012 at 01:51:08AM -0600, Scott Moreau wrote:
>> ---
>
>>
>> - write_png(output_width, output_height, data);
>> + write_png(ss_area_width, ss_area_height, data);
>> +
>> + wl_list_for_each(ss_output,&output_list, link) {
>> + free(ss_output);
>
> You need wl_list_for_each_safe here since you're freeing the structs
> that holds the prev/next pointers.
>
Is there a point to having two different ones? The compiler still
generates code to stash the next and prev pointers, so any difference
in execution time should be microscopic, if it exists at all, and the
possibility of using the wrong one is obviously very real.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
More information about the wayland-devel
mailing list