[Xfce4-commits] [xfce/thunar] 02/05: Coverity CID 60619: Explicit null dereferenced

noreply at xfce.org noreply at xfce.org
Wed Apr 22 13:44:37 CEST 2015


This is an automated email from the git hooks/post-receive script.

hjudt pushed a commit to branch master
in repository xfce/thunar.

commit 460f70261d80f65ef7dd6757b173bbf835ceb5c5
Author: Harald Judt <h.judt at gmx.at>
Date:   Wed Apr 22 12:56:39 2015 +0200

    Coverity CID 60619: Explicit null dereferenced
    
    CID 60619 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
    20. var_deref_op: Dereferencing null pointer left_button.
---
 thunar/thunar-location-buttons.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/thunar/thunar-location-buttons.c b/thunar/thunar-location-buttons.c
index 6979ec6..5a02127 100644
--- a/thunar/thunar-location-buttons.c
+++ b/thunar/thunar-location-buttons.c
@@ -1080,7 +1080,7 @@ thunar_location_buttons_scroll_right (GtkWidget             *button,
       }
 
   if (G_UNLIKELY (right_button == NULL))
-      return;
+    return;
 
   /* find the last visible button on the 'left' end */
   for (lp = g_list_last (buttons->list); lp != NULL; lp = lp->prev)
@@ -1101,6 +1101,9 @@ thunar_location_buttons_scroll_right (GtkWidget             *button,
                       - (buttons->right_slider->allocation.x + buttons->right_slider->allocation.width);
     }
 
+  if (G_UNLIKELY (left_button == NULL))
+    return;
+
   /* We have space_available extra space that's not being used.  We
    * need space_needed space to make the button fit.  So we walk down
    * from the end, removing buttons until we get all the space we

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list