mirror of
https://gitlab.gnome.org/GNOME/libmks.git
synced 2024-12-22 05:35:21 +00:00
Merge branch 'bilelmoussaoui/dmabuf-division-0' into 'main'
dmabuf: Avoid division by 0 See merge request GNOME/libmks!36
This commit is contained in:
commit
7a101fc4d7
@ -98,7 +98,10 @@ mks_dmabuf_paintable_get_intrinsic_aspect_ratio (GdkPaintable *paintable)
|
||||
{
|
||||
MksDmabufPaintable *self = MKS_DMABUF_PAINTABLE (paintable);
|
||||
|
||||
if (self->height != 0)
|
||||
return (double)self->width / (double)self->height;
|
||||
else
|
||||
return 0.;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user