diff options
| author | Gregory Maxwell <[email protected]> | 2016-11-29 01:00:11 +0000 |
|---|---|---|
| committer | Gregory Maxwell <[email protected]> | 2016-12-03 07:17:28 +0000 |
| commit | c63198f1c787d69052d6332c5e52118f58eacf56 (patch) | |
| tree | 3f2debf1c040c2168f1e38aaf9ffaee738a89a82 /src/qt/bitcoin.cpp | |
| parent | Merge #9260: Mrs Peacock in The Library with The Candlestick (killed main.{h,... (diff) | |
| download | discoin-c63198f1c787d69052d6332c5e52118f58eacf56.tar.xz discoin-c63198f1c787d69052d6332c5e52118f58eacf56.zip | |
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/bitcoin.cpp')
| -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 4f48e21a2..ba4983029 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(); } |