[Xfce4-commits] <xfce4-panel:andrzejr/deskbar-length-adjust> panel-itembar: fixed a crash during DnD introduced in this branch.

Andrzej noreply at xfce.org
Tue Dec 20 13:20:01 CET 2011


Updating branch refs/heads/andrzejr/deskbar-length-adjust
         to 62e42ce04937bd319fe502732cff401e007836c2 (commit)
       from 3521e025e80837177d7041a259758f177f52cebb (commit)

commit 62e42ce04937bd319fe502732cff401e007836c2
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Tue Dec 20 21:18:19 2011 +0900

    panel-itembar: fixed a crash during DnD introduced in this branch.

 panel/panel-itembar.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/panel/panel-itembar.c b/panel/panel-itembar.c
index 5e1acdd..c7f611c 100644
--- a/panel/panel-itembar.c
+++ b/panel/panel-itembar.c
@@ -444,13 +444,14 @@ panel_itembar_size_allocate (GtkWidget     *widget,
   for (lp = itembar->children; lp != NULL; lp = lp->next)
     {
       child = lp->data;
-      child->length = 0;
 
       if (G_LIKELY (child != NULL))
         {
           if (!GTK_WIDGET_VISIBLE (child->widget))
             continue;
 
+          child->length = 0;
+
           gtk_widget_get_child_requisition (child->widget, &child_req);
 
           child_len = CHILD_LENGTH (child_req, itembar);
@@ -516,7 +517,8 @@ panel_itembar_size_allocate (GtkWidget     *widget,
           for (lp = itembar->children; lp != NULL; lp = lp->next)
             {
               child = lp->data;
-              if (child->option == CHILD_OPTION_SHRINK && GTK_WIDGET_VISIBLE (child->widget))
+              if (child != NULL && child->option == CHILD_OPTION_SHRINK
+                  && GTK_WIDGET_VISIBLE (child->widget))
                 {
                   gtk_widget_get_child_requisition (child->widget, &child_req);
                   child_len = CHILD_LENGTH (child_req, itembar);


More information about the Xfce4-commits mailing list