backend-pipewire: Move region initialization at the start
Failure to do so, might cause a crash if the output repaint happens
before the pipewire pipeline started -- calling pixman_region32_fini on
a uninitialized region.
Fixes 2abe4efcf7
, "libweston/backends: Move damage flush into backends"
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
4861b19f3d
commit
b93335a741
|
@ -735,11 +735,11 @@ pipewire_output_repaint(struct weston_output *base)
|
|||
|
||||
assert(output);
|
||||
|
||||
pixman_region32_init(&damage);
|
||||
|
||||
if (pw_stream_get_state(output->stream, NULL) != PW_STREAM_STATE_STREAMING)
|
||||
goto out;
|
||||
|
||||
pixman_region32_init(&damage);
|
||||
|
||||
weston_output_flush_damage_for_primary_plane(base, &damage);
|
||||
|
||||
if (!pixman_region32_not_empty(&damage))
|
||||
|
|
Loading…
Reference in New Issue