screen-cast: Fix segfault when drawing cursor
Add a sanity check if the cursor is on screen and cursor texture data is available. This prevents a potential segfault when trying to access non-existing texture data. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1446 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1604>
This commit is contained in:
parent
6c4b897d74
commit
efb577efb0
@ -443,6 +443,9 @@ maybe_paint_cursor_sprite (MetaScreenCastMonitorStreamSrc *monitor_src,
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
|
||||
if (!is_cursor_in_stream (monitor_src))
|
||||
return;
|
||||
|
||||
cursor_sprite = meta_cursor_renderer_get_cursor (cursor_renderer);
|
||||
if (!cursor_sprite)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user