Skip to content

Commit

Permalink
Fix crash: CoinControl "space" bug
Browse files Browse the repository at this point in the history
This is a port of the pull bitcoin/bitcoin#5700 made by fsb4000 for
Bitcoin Core to fix the crash problem: CoinControl "space" bug.
  • Loading branch information
jyap808 committed Sep 14, 2015
1 parent 812a620 commit 066fe32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qt/coincontroltreewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event)
{
event->ignore();
int COLUMN_CHECKBOX = 0;
this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
if(this->currentItem())
this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
}
else if (event->key() == Qt::Key_Escape) // press esc -> close dialog
{
Expand All @@ -25,4 +26,4 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event)
{
this->QTreeWidget::keyPressEvent(event);
}
}
}

0 comments on commit 066fe32

Please sign in to comment.