forked from AuroraMiddleware/gtk
image: Don't assume baseline parameters are non-NULL
The GetSize callback *can* assume that minimum and natural are non-NULL. Buy minimum_baseline and natural_baseline can and will be NULL, so handle that. This was causing crashes e.g. in pavucontrol.
This commit is contained in:
parent
485c28d300
commit
3075dac106
@ -1694,7 +1694,10 @@ gtk_image_get_content_size (GtkCssGadget *gadget,
|
||||
{
|
||||
baseline_align = gtk_image_get_baseline_align (GTK_IMAGE (widget));
|
||||
*minimum = *natural = height;
|
||||
*minimum_baseline = *natural_baseline = height * baseline_align;
|
||||
if (minimum_baseline)
|
||||
*minimum_baseline = height * baseline_align;
|
||||
if (natural_baseline)
|
||||
*natural_baseline = height * baseline_align;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user