[gtk+] sizerequest: Don't pass uninitialized values to measure
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] sizerequest: Don't pass uninitialized values to measure
- Date: Sat, 28 Oct 2017 09:43:40 +0000 (UTC)
commit 4dee08dd52aac551d4e0303a56902c9179a6efa4
Author: Timm Bäder <mail baedert org>
Date: Sat Oct 28 11:37:13 2017 +0200
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.
gtk/gtksizerequest.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index 9d991b1..458a6d1 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -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' */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]