diff options
author | William Jon McCann <jmccann@redhat.com> | 2010-11-20 13:30:52 -0500 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2010-11-20 13:33:19 -0500 |
commit | e3367c92f0c43199a229d6285d8afa212aec515e (patch) | |
tree | 05e9090090d7e2c513a3be6756c46f84c73fda3e /libgnome-control-center | |
parent | aac24399f847df62708d77cb5a0cff025a7ff30d (diff) |
Don't assume that get_preferred_* arguments can't be NULL
Fixes a crash introduced by f5f5aac5c065e5be0d5c080ffa1c075423c4cef7
Diffstat (limited to 'libgnome-control-center')
-rw-r--r-- | libgnome-control-center/cc-panel.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libgnome-control-center/cc-panel.c b/libgnome-control-center/cc-panel.c index 9cb5da500..0ed562779 100644 --- a/libgnome-control-center/cc-panel.c +++ b/libgnome-control-center/cc-panel.c @@ -131,7 +131,11 @@ cc_panel_get_preferred_width (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkWidget *child; - *minimum = *natural = 0; + if (minimum != NULL) + *minimum = 0; + + if (natural != NULL) + *natural = 0; if ((child = gtk_bin_get_child (bin))) gtk_widget_get_preferred_width (child, minimum, natural); @@ -145,7 +149,11 @@ cc_panel_get_preferred_height (GtkWidget *widget, GtkBin *bin = GTK_BIN (widget); GtkWidget *child; - *minimum = *natural = 0; + if (minimum != NULL) + *minimum = 0; + + if (natural != NULL) + *natural = 0; if ((child = gtk_bin_get_child (bin))) gtk_widget_get_preferred_height (child, minimum, natural); |