diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index f3fe4096a..74f5c774a 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -91,8 +91,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
if (nNet > 0)
{
// Credit
- if (IsValidDestinationString(rec->address)) {
- CTxDestination address = DecodeDestination(rec->address);
+ CTxDestination address = DecodeDestination(rec->address);
+ if (IsValidDestination(address)) {
if (wallet->mapAddressBook.count(address))
{
strHTML += "" + tr("From") + ": " + tr("unknown") + "
";