Initiliaze/assign sendResult. Prevents NullPointerException and app from crashing when sending money out.

This commit is contained in:
monk 2014-03-25 13:35:01 +01:00
parent 0ed260bae2
commit 7ffe2a6360

View File

@ -36,7 +36,7 @@ public class SendMoneyController {
try {
Address destination = new Address(Main.params, address.getText());
Wallet.SendRequest req = Wallet.SendRequest.emptyWallet(destination);
Main.bitcoin.wallet().sendCoins(req);
sendResult = Main.bitcoin.wallet().sendCoins(req);
Futures.addCallback(sendResult.broadcastComplete, new FutureCallback<Transaction>() {
@Override
public void onSuccess(Transaction result) {