diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-23 16:07:58 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-23 16:22:20 +0100 |
commit | b6acd4563d3b96b244e61b87b9f08c0eb61ecaa6 (patch) | |
tree | 5276ccd1d770a2db71838396dbb370823096555e | |
parent | 944c256741b260bd8b758be4a0543af1cb080943 (diff) | |
parent | 0eade74c783f670cb69ab982f5a828f7ff5ee0db (diff) |
Merge pull request #5700
0eade74 fix crash: CoinControl "space" bug (fsb4000)
-rw-r--r-- | src/qt/coincontroltreewidget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/coincontroltreewidget.cpp b/src/qt/coincontroltreewidget.cpp index 6cbcf7128d..5dcbf0c3f1 100644 --- a/src/qt/coincontroltreewidget.cpp +++ b/src/qt/coincontroltreewidget.cpp @@ -17,7 +17,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 { @@ -29,4 +30,4 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event) { this->QTreeWidget::keyPressEvent(event); } -}
\ No newline at end of file +} |