From ca433ff2f6575c92f612891d9b70f074eec6803a Mon Sep 17 00:00:00 2001
From: Inso <insomniak.fr@gmail.com>
Date: Wed, 16 Sep 2015 20:33:41 +0200
Subject: [PATCH] Fix right click in network tab

---
 src/cutecoin/gui/network_tab.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cutecoin/gui/network_tab.py b/src/cutecoin/gui/network_tab.py
index 8805a2d5..65065379 100644
--- a/src/cutecoin/gui/network_tab.py
+++ b/src/cutecoin/gui/network_tab.py
@@ -57,7 +57,7 @@ class NetworkTabWidget(QWidget, Ui_NetworkTabWidget):
     def node_context_menu(self, point):
         index = self.table_network.indexAt(point)
         model = self.table_network.model()
-        if index.row() < model.rowCount(QModelIndex()):
+        if index.isValid() and index.row() < model.rowCount(QModelIndex()):
             source_index = model.mapToSource(index)
             is_root_col = model.sourceModel().columns_types.index('is_root')
             is_root_index = model.sourceModel().index(source_index.row(), is_root_col)
-- 
GitLab