Merge pull request #867 from laanwj/2012_02_hidetrayicononquit
authorWladimir J. van der Laan <laanwj@gmail.com>
Sun, 19 Feb 2012 19:30:32 +0000 (11:30 -0800)
committerWladimir J. van der Laan <laanwj@gmail.com>
Sun, 19 Feb 2012 19:30:32 +0000 (11:30 -0800)
Hide tray icon in destructor, as deleting will let it linger until quit (on ubuntu)

src/bignum.h
src/wallet.cpp

index 4143f60..a750025 100644 (file)
@@ -243,7 +243,7 @@ public:
     std::vector<unsigned char> getvch() const
     {
         unsigned int nSize = BN_bn2mpi(this, NULL);
-        if (nSize < 4)
+        if (nSize <= 4)
             return std::vector<unsigned char>();
         std::vector<unsigned char> vch(nSize);
         BN_bn2mpi(this, &vch[0]);
index 1e769d7..9d80f8a 100644 (file)
@@ -191,7 +191,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
             if (!pwalletdbEncryption->TxnCommit())
                 exit(1); //We now have keys encrypted in memory, but no on disk...die to avoid confusion and let the user reload their unencrypted wallet.
 
-            pwalletdbEncryption->Close();
+            delete pwalletdbEncryption;
             pwalletdbEncryption = NULL;
         }