screen-cast-stream-src: Do not try to create a 0-sized texture when scaled
When the screen is scaled and we are recording/sharing the screen we may end up crash as per trying to create a 0-sized texture due to missing ceiling of the texture size. This is similar to what was fixed in commit4d4e8e5862
and the same fix was included in commit422ee4515
, but hidden under a compilation fix Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3978>
This commit is contained in:
parent
0d60d07204
commit
081b918bac
1 changed files with 2 additions and 2 deletions
|
@ -391,8 +391,8 @@ meta_screen_cast_stream_src_draw_cursor_into (MetaScreenCastStreamSrc *src,
|
|||
|
||||
texture_width = cogl_texture_get_width (cursor_texture);
|
||||
texture_height = cogl_texture_get_height (cursor_texture);
|
||||
width = texture_width * scale;
|
||||
height = texture_height * scale;
|
||||
width = ceilf (texture_width * scale);
|
||||
height = ceilf (texture_height * scale);
|
||||
|
||||
if (texture_width == width &&
|
||||
texture_height == height &&
|
||||
|
|
Loading…
Reference in a new issue