[pitivi] Fixes traceback when user double-clicks on an empty row in the treeview



commit b59af58f2511bdac7bf6dba56d71ee0a026b89cf
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date:   Tue Aug 21 16:22:56 2012 +0200

    Fixes traceback when user double-clicks on an empty row in the treeview

 pitivi/medialibrary.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 9ca6ce4..97c56ad 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -1012,7 +1012,10 @@ class MediaLibraryWidget(gtk.VBox, Loggable):
 
     def _rowUnderMouseSelected(self, view, event):
         if isinstance(view, gtk.TreeView):
-            path, column, x, y = view.get_path_at_pos(int(event.x), int(event.y))
+            path = None
+            tup = view.get_path_at_pos(int(event.x), int(event.y))
+            if tup:
+                path, column, x, y = tup
             if path:
                 selection = view.get_selection()
                 return selection.path_is_selected(path) and selection.count_selected_rows() > 0



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