aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiondesc.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-10-09 23:17:43 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-10-09 23:17:43 +0000
commit4cf9b4c6fad8e2ead715c5fbbfb023e05826a94d (patch)
treecf8d0b8d7abef0be531d4788b0653b1286136971 /src/qt/transactiondesc.cpp
parent638cecee77dba4bcffb225627f63658b247709ea (diff)
parentcef36fad891fba0fd8f5aec73bb17135b7fb133a (diff)
downloadbitcoin-4cf9b4c6fad8e2ead715c5fbbfb023e05826a94d.tar.xz
Merge branch '0.5.x' into 0.6.0.x
Conflicts: src/qt/transactiondesc.cpp
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r--src/qt/transactiondesc.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 089fe751b8..a91fc3880e 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -66,11 +66,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
{
strHTML += tr("<b>Source:</b> Generated<br>");
}
- else if (!wtx.mapValue["from"].empty())
+ else if (wtx.mapValue.count("from") && !wtx.mapValue["from"].empty())
{
// Online transaction
- if (!wtx.mapValue["from"].empty())
- strHTML += tr("<b>From:</b> ") + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>";
+ strHTML += tr("<b>From:</b> ") + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>";
}
else
{
@@ -107,7 +106,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
// To
//
string strAddress;
- if (!wtx.mapValue["to"].empty())
+ if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty())
{
// Online transaction
strAddress = wtx.mapValue["to"];
@@ -164,7 +163,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
if (wallet->IsMine(txout))
continue;
- if (wtx.mapValue["to"].empty())
+ if (!wtx.mapValue.count("to") || wtx.mapValue["to"].empty())
{
// Offline transaction
CBitcoinAddress address;
@@ -213,9 +212,9 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
//
// Message
//
- if (!wtx.mapValue["message"].empty())
+ if (wtx.mapValue.count("message") && !wtx.mapValue["message"].empty())
strHTML += QString("<br><b>") + tr("Message:") + "</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "<br>";
- if (!wtx.mapValue["comment"].empty())
+ if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
strHTML += QString("<br><b>") + tr("Comment:") + "</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
strHTML += QString("<b>") + tr("Transaction ID:") + "</b> " + wtx.GetHash().ToString().c_str() + "<br>";