Skip to content

Commit

Permalink
[GUI] Segfault for a bad cast of the parent widget in the escape key …
Browse files Browse the repository at this point in the history
…press event.
  • Loading branch information
furszy authored and Stamek committed Aug 22, 2020
1 parent ce25177 commit 50020be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qt/coincontroltreewidget.cpp
Expand Up @@ -23,7 +23,7 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent* event)
} else if (event->key() == Qt::Key_Escape) // press esc -> close dialog
{
event->ignore();
CoinControlDialog* coinControlDialog = (CoinControlDialog*)this->parentWidget();
auto* coinControlDialog = (CoinControlDialog*) this->parentWidget()->parentWidget();
coinControlDialog->done(QDialog::Accepted);
} else {
this->QTreeWidget::keyPressEvent(event);
Expand Down

0 comments on commit 50020be

Please sign in to comment.