mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Make QT runawayException call GetWarnings instead of directly access strMiscWarning.
This is a first step in avoiding racy accesses to strMiscWarning. The change required moving GetWarnings and related globals to util.
This commit is contained in:
parent
2efcfa5acf
commit
c63198f1c7
5 changed files with 59 additions and 49 deletions
|
|
@ -260,7 +260,7 @@ BitcoinCore::BitcoinCore():
|
|||
void BitcoinCore::handleRunawayException(const std::exception *e)
|
||||
{
|
||||
PrintExceptionContinue(e, "Runaway exception");
|
||||
Q_EMIT runawayException(QString::fromStdString(strMiscWarning));
|
||||
Q_EMIT runawayException(QString::fromStdString(GetWarnings("gui")));
|
||||
}
|
||||
|
||||
void BitcoinCore::initialize()
|
||||
|
|
@ -691,10 +691,10 @@ int main(int argc, char *argv[])
|
|||
app.exec();
|
||||
} catch (const std::exception& e) {
|
||||
PrintExceptionContinue(&e, "Runaway exception");
|
||||
app.handleRunawayException(QString::fromStdString(strMiscWarning));
|
||||
app.handleRunawayException(QString::fromStdString(GetWarnings("gui")));
|
||||
} catch (...) {
|
||||
PrintExceptionContinue(NULL, "Runaway exception");
|
||||
app.handleRunawayException(QString::fromStdString(strMiscWarning));
|
||||
app.handleRunawayException(QString::fromStdString(GetWarnings("gui")));
|
||||
}
|
||||
return app.getReturnValue();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue