diff options
author | Gregory Maxwell <greg@xiph.org> | 2016-11-29 01:00:11 +0000 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2016-12-03 07:17:28 +0000 |
commit | c63198f1c787d69052d6332c5e52118f58eacf56 (patch) | |
tree | 3f2debf1c040c2168f1e38aaf9ffaee738a89a82 /src/qt | |
parent | 2efcfa5acfacb958973d9e8125e1d81f102e2dfd (diff) | |
download | bitcoin-c63198f1c787d69052d6332c5e52118f58eacf56.tar.xz |
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.
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 4f48e21a22..ba49830297 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -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(); } |