mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
ShellTextureCache: Don't try to scale pixbuf to 0 size
If we pass in -1 for both width and height, we'd attempt to scale the image to 0x0. Don't do that; just avoid scaling the pixbuf and let ClutterTexture do it for us.
This commit is contained in:
parent
43d737c663
commit
25a5da074c
1 changed files with 1 additions and 1 deletions
|
|
@ -210,7 +210,7 @@ compute_pixbuf_scale (gint width,
|
|||
}
|
||||
|
||||
// Scale the image only if that will not increase its original dimensions.
|
||||
if (scaled_width >= 0 && scaled_height >= 0 && scaled_width < width && scaled_height < height)
|
||||
if (scaled_width > 0 && scaled_height > 0 && scaled_width < width && scaled_height < height)
|
||||
{
|
||||
*new_width = scaled_width;
|
||||
*new_height = scaled_height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue