sizerequest: Don't pass uninitialized values to measure

The GtkWidgetClass::measure vfunc is not required to assign a value to
any of the (out) parameters, so we need to initialize the locals we pass
to it, otherwise we can end up with a garbage size request.
This commit is contained in:
Timm Bäder 2017-10-28 11:37:13 +02:00
parent 559d32420c
commit 4dee08dd52

View File

@ -189,8 +189,8 @@ gtk_widget_query_size_for_orientation (GtkWidget *widget,
else
{
int dummy = 0;
int minimum_for_size;
int natural_for_size;
int minimum_for_size = 0;
int natural_for_size = 0;
/* Pull the base natural size from the cache as it's needed to adjust
* the proposed 'for_size' */