[nautilus] pathbar: fix set_label_size_request() for no-label buttons



commit 1366373ceb60ee0021a0b649fb02cf299f0c5573
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Jul 2 19:04:15 2012 -0400

    pathbar: fix set_label_size_request() for no-label buttons
    
    It's convenient to just call this in a loop on the button data, so just
    return if there's no label to set the size request for.

 src/nautilus-pathbar.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index ffc7da0..dc12a9e 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -352,6 +352,10 @@ set_label_size_request (ButtonData *button_data)
         gchar *markup;
 	GtkRequisition min_req, bold_req;
 
+	if (button_data->label == NULL) {
+		return;
+	}
+
 	gtk_label_set_ellipsize (GTK_LABEL (button_data->label), PANGO_ELLIPSIZE_NONE);
 	gtk_widget_get_preferred_size (button_data->label, &min_req, NULL);
 	gtk_label_set_ellipsize (GTK_LABEL (button_data->label), PANGO_ELLIPSIZE_MIDDLE);	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]