[Xfce4-commits] [xfce/thunar] 01/05: Coverity CID 60617: Unchecked return value

noreply at xfce.org noreply at xfce.org
Wed Apr 22 13:44:36 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 503db56621fb19f51f15964e1ce79c7adaf2f8a1
Author: Harald Judt <h.judt at gmx.at>
Date:   Wed Apr 22 12:47:59 2015 +0200

    Coverity CID 60617: Unchecked return value
    
    CID 60617 (#1 of 1): Unchecked return value (CHECKED_RETURN)
    1. check_return: Calling gtk_tree_model_get_iter_first without
    checking return value (as is done elsewhere 4 out of 5 times).
---
 thunar/thunar-shortcuts-view.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index 91c5294..2e05a0a 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -981,7 +981,8 @@ thunar_shortcuts_view_context_menu_visibility (ThunarShortcutsView *view,
 
   /* process all items below the header */
   child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
-  gtk_tree_model_get_iter_first (GTK_TREE_MODEL (child_model), &iter);
+  if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (child_model), &iter))
+      return;
   path = gtk_tree_model_get_path (child_model, &iter);
   do
     {

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


More information about the Xfce4-commits mailing list