Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ void BitcoinGUI::setNumConnections(int count)

void BitcoinGUI::setNumBlocks(int count)
{
if(!clientModel)
return;

// Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
statusBar()->clearMessage();

Expand Down Expand Up @@ -823,7 +826,7 @@ void BitcoinGUI::changeEvent(QEvent *e)
#ifndef Q_OS_MAC // Ignored on Mac
if(e->type() == QEvent::WindowStateChange)
{
if(clientModel && clientModel->getOptionsModel()->getMinimizeToTray())
if(clientModel && clientModel->getOptionsModel() && clientModel->getOptionsModel()->getMinimizeToTray())
{
QWindowStateChangeEvent *wsevt = static_cast<QWindowStateChangeEvent*>(e);
if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized())
Expand All @@ -838,16 +841,15 @@ void BitcoinGUI::changeEvent(QEvent *e)

void BitcoinGUI::closeEvent(QCloseEvent *event)
{
if(clientModel)
{
#ifndef Q_OS_MAC // Ignored on Mac
if(!clientModel->getOptionsModel()->getMinimizeToTray() &&
!clientModel->getOptionsModel()->getMinimizeOnClose())
if(clientModel && clientModel->getOptionsModel())
{
if(!clientModel->getOptionsModel()->getMinimizeOnClose())
{
QApplication::quit();
}
#endif
}
#endif
QMainWindow::closeEvent(event);
}

Expand Down Expand Up @@ -908,8 +910,7 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
gotoSendCoinsPage();
return true;
}
else
return false;
return false;
}

void BitcoinGUI::setEncryptionStatus(int status)
Expand Down