Merge pull request #17310 from karalabe/mobile-nil-panic

mobile: fix missing return for CallMsg.SetTo(nil)
This commit is contained in:
Péter Szilágyi 2018-08-03 09:37:57 +03:00 committed by GitHub
commit d56fa8a659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ func (msg *CallMsg) SetData(data []byte) { msg.msg.Data = common.CopyBytes
func (msg *CallMsg) SetTo(address *Address) {
if address == nil {
msg.msg.To = nil
return
}
msg.msg.To = &address.address
}