Browse Source

qt history list: fix #4896

master
SomberNight 7 years ago
parent
commit
e35f2c5bed
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 4
      electrum/gui/qt/history_list.py

4
electrum/gui/qt/history_list.py

@ -461,7 +461,9 @@ class HistoryList(MyTreeView, AcceptFileDragDrop):
org_idx: QModelIndex = self.indexAt(position) org_idx: QModelIndex = self.indexAt(position)
idx = self.proxy.mapToSource(org_idx) idx = self.proxy.mapToSource(org_idx)
item: QStandardItem = self.std_model.itemFromIndex(idx) item: QStandardItem = self.std_model.itemFromIndex(idx)
assert item, 'create_menu: index not found in model' if not item:
# can happen e.g. before list is populated for the first time
return
tx_hash = idx.data(self.TX_HASH_ROLE) tx_hash = idx.data(self.TX_HASH_ROLE)
column = idx.column() column = idx.column()
assert tx_hash, "create_menu: no tx hash" assert tx_hash, "create_menu: no tx hash"

Loading…
Cancel
Save