[meld/meld-1.6] Check tree path validity when popping up menus (closes rhbz#843879)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/meld-1.6] Check tree path validity when popping up menus (closes rhbz#843879)
- Date: Fri, 19 Oct 2012 18:48:19 +0000 (UTC)
commit 181808af06daa0ac6fae8a8ddb65bf862ccdc609
Author: Kai Willadsen <kai willadsen gmail com>
Date: Fri Oct 12 17:46:02 2012 +1000
Check tree path validity when popping up menus (closes rhbz#843879)
meld/dirdiff.py | 2 ++
meld/vcview.py | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 88c8365..fd6a9fb 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -995,6 +995,8 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
if event.button == 3:
treeview.grab_focus()
path = treeview.get_path_at_pos(int(event.x), int(event.y))
+ if path is None:
+ return False
selection = treeview.get_selection()
model, rows = selection.get_selected_rows()
diff --git a/meld/vcview.py b/meld/vcview.py
index 3e44ff1..98bc08b 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -429,6 +429,8 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
def on_button_press_event(self, treeview, event):
if event.button == 3:
path = treeview.get_path_at_pos(int(event.x), int(event.y))
+ if path is None:
+ return False
selection = treeview.get_selection()
model, rows = selection.get_selected_rows()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]