From 8d4ccc712bd4386e84a7bbb491194cb74207398a Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 12 Dec 2011 20:36:09 -0800 Subject: [PATCH] Sometimes the simplest errors are the hardest to find. Local variable shadowed class member. --- Wallet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Wallet.cpp b/Wallet.cpp index c83e999143..d7b1577106 100644 --- a/Wallet.cpp +++ b/Wallet.cpp @@ -4,13 +4,13 @@ #include #include -LocalAccount::LocalAccount(bool) : mAmount(0), mSeqNum(0) +LocalAccount::LocalAccount(bool) : mAmount(0), mSeqNum(0), mPublicKey(new CKey()) { mPrivateKey.MakeNewKey(); - CKey::pointer mPublicKey(new CKey()); mPublicKey->SetPubKey(mPrivateKey.GetPubKey()); acctID=Hash160(mPublicKey->GetPubKey()); mPublicKey=theApp->getPubKeyCache().store(acctID, mPublicKey); + assert(mPublicKey); mAddress.SetHash160(acctID); }