[totem] main: Get out of delete_foreach() if the path isn't valid



commit 6afa220f999e59cb86bc01bbb920da0b6a27d1c3
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Mar 14 15:45:44 2014 +0100

    main: Get out of delete_foreach() if the path isn't valid
    
    Just being safe.

 src/totem-grilo.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index 590ee4b..e2c8353 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -2056,7 +2056,9 @@ delete_foreach (gpointer data,
        gboolean success;
        GError *error = NULL;
 
-       gtk_tree_model_get_iter (view_model, &iter, path);
+       if (!gtk_tree_model_get_iter (view_model, &iter, path))
+               return;
+
        gtk_tree_model_get (view_model, &iter,
                            MODEL_RESULTS_CONTENT, &media,
                            MODEL_RESULTS_SOURCE, &source,


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