[easytag] Avoid a potentially-uninitialised variable



commit 47754d8f31f8711993dd6a730ef7c0eece6cac69
Author: David King <amigadave amigadave com>
Date:   Sat Mar 29 14:50:59 2014 +0000

    Avoid a potentially-uninitialised variable
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727295

 src/browser.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/browser.c b/src/browser.c
index 299838e..8f6351f 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -985,10 +985,15 @@ Browser_List_Row_Selected (GtkTreeSelection *selection, gpointer data)
         // Returns the last line selected (in ascending line order) to display the item
         lastSelected = (GtkTreePath *)g_list_last(selectedRows)->data;
         if (gtk_tree_model_get_iter(GTK_TREE_MODEL(fileListModel), &lastFile, lastSelected))
-            gtk_tree_model_get(GTK_TREE_MODEL(fileListModel), &lastFile,
-                               LIST_FILE_POINTER, &fileETFile, -1);
-
-        Action_Select_Nth_File_By_Etfile(fileETFile);
+        {
+            gtk_tree_model_get (GTK_TREE_MODEL(fileListModel), &lastFile,
+                                LIST_FILE_POINTER, &fileETFile, -1);
+            Action_Select_Nth_File_By_Etfile (fileETFile);
+        }
+        else
+        {
+            g_warning ("%s", "Error getting iter from last path in selection");
+        }
     }else
     {
         // The real last selected line


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