electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit e35f2c5beded584fa2845af9f3a6f18211a75a23
parent 923a9c36cbf4b47e5942e80ebb478dcc063e5611
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue,  4 Dec 2018 17:27:02 +0100

qt history list: fix #4896

Diffstat:
Melectrum/gui/qt/history_list.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/electrum/gui/qt/history_list.py b/electrum/gui/qt/history_list.py @@ -461,7 +461,9 @@ class HistoryList(MyTreeView, AcceptFileDragDrop): org_idx: QModelIndex = self.indexAt(position) idx = self.proxy.mapToSource(org_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) column = idx.column() assert tx_hash, "create_menu: no tx hash"