aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-11-09 11:57:10 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-11-09 11:57:31 +0100
commit92701b3b891884706390c2bfff3209310656aa1e (patch)
tree84c50cb7b8447730453204ff1739651542b1e9e3 /src
parent4ee149a6db25cde31432f83369b40c92be13021c (diff)
parent2980a18572dbe6173c41afc037b0cefe367d935c (diff)
Merge pull request #6970
2980a18 Fix crash in validateaddress with -disablewallet (Wladimir J. van der Laan)
Diffstat (limited to 'src')
-rw-r--r--src/rpcmisc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 0f0457c5cf..0c656d5cf1 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -117,7 +117,7 @@ public:
UniValue obj(UniValue::VOBJ);
CPubKey vchPubKey;
obj.push_back(Pair("isscript", false));
- if (pwalletMain->GetPubKey(keyID, vchPubKey)) {
+ if (pwalletMain && pwalletMain->GetPubKey(keyID, vchPubKey)) {
obj.push_back(Pair("pubkey", HexStr(vchPubKey)));
obj.push_back(Pair("iscompressed", vchPubKey.IsCompressed()));
}
@@ -128,7 +128,7 @@ public:
UniValue obj(UniValue::VOBJ);
CScript subscript;
obj.push_back(Pair("isscript", true));
- if (pwalletMain->GetCScript(scriptID, subscript)) {
+ if (pwalletMain && pwalletMain->GetCScript(scriptID, subscript)) {
std::vector<CTxDestination> addresses;
txnouttype whichType;
int nRequired;