diff options
| author | Andrew Chow <[email protected]> | 2017-03-22 20:34:27 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2017-03-24 21:41:34 -0400 |
| commit | 4df76e270caa9d828179cae1c7a8918d6f91ec21 (patch) | |
| tree | 5bf23cc535f575aee48ae4e7829ef3e0e083e8c5 /src | |
| parent | Merge #10017: combine_logs.py - aggregates log files from multiple bitcoinds ... (diff) | |
| download | discoin-4df76e270caa9d828179cae1c7a8918d6f91ec21.tar.xz discoin-4df76e270caa9d828179cae1c7a8918d6f91ec21.zip | |
Ensure an item exists on the rpcconsole stack before adding
Ensures that there is an item on the rpcconsole stack before adding something to the current stack so that a segmentation fault does not occur.
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/rpcconsole.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 60406c205..001f19926 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -175,6 +175,10 @@ bool RPCConsole::RPCParseCommandLine(std::string &strResult, const std::string & nDepthInsideSensitive = 1; filter_begin_pos = chpos; } + // Make sure stack is not empty before adding something + if (stack.empty()) { + stack.push_back(std::vector<std::string>()); + } stack.back().push_back(strArg); }; |