From d1729acd2bb15401e6b9b6a41bd753b122771d3c Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Fri, 10 Apr 2015 11:43:08 +0300 Subject: cmd/mist: fix another nil recipient address panic. --- cmd/mist/gui.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'cmd/mist') diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go index d37d6f81b..66614478c 100644 --- a/cmd/mist/gui.go +++ b/cmd/mist/gui.go @@ -238,13 +238,11 @@ func (gui *Gui) insertTransaction(window string, tx *types.Transaction) { inout = "recv" } - var ( - ptx = xeth.NewTx(tx) - send = from.Hex() - rec = tx.To().Hex() - ) - ptx.Sender = send - ptx.Address = rec + ptx := xeth.NewTx(tx) + ptx.Sender = from.Hex() + if to := tx.To(); to != nil { + ptx.Address = to.Hex() + } if window == "post" { //gui.getObjectByName("transactionView").Call("addTx", ptx, inout) -- cgit