aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2017-03-22 20:34:27 -0400
committerAndrew Chow <achow101-github@achow101.com>2017-03-24 21:41:34 -0400
commit4df76e270caa9d828179cae1c7a8918d6f91ec21 (patch)
tree5bf23cc535f575aee48ae4e7829ef3e0e083e8c5 /src/qt
parent02d64bd929c9663ba38e96721c6dbd89972d043d (diff)
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/qt')
-rw-r--r--src/qt/rpcconsole.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 60406c2059..001f199264 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);
};