aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-22 21:49:13 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-07-22 21:49:13 -0700
commite2e7c10a3a664841e12af8531d0c3145a548d7d6 (patch)
tree1fcbd6211d6fded6a1320d375b7a8186a8ea3724
parentfb2d9ddf20998f177ebf404413de4d8d94749a48 (diff)
Fixed #230: fixed AbstractMessagePart::partForUniqueID() and case when all required data have not been retrieved yet htmlForAbstractMessagePart()
-rw-r--r--src/core/abstract/MCAbstractMessagePart.cc2
-rw-r--r--src/core/renderer/MCHTMLRenderer.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/core/abstract/MCAbstractMessagePart.cc b/src/core/abstract/MCAbstractMessagePart.cc
index b4ec4c9a..be6e8e9b 100644
--- a/src/core/abstract/MCAbstractMessagePart.cc
+++ b/src/core/abstract/MCAbstractMessagePart.cc
@@ -75,5 +75,5 @@ AbstractPart * AbstractMessagePart::partForContentID(String * contentID)
AbstractPart * AbstractMessagePart::partForUniqueID(String * contentID)
{
- return mainPart()->partForContentID(contentID);
+ return mainPart()->partForUniqueID(contentID);
}
diff --git a/src/core/renderer/MCHTMLRenderer.cc b/src/core/renderer/MCHTMLRenderer.cc
index 5cffa106..071d7523 100644
--- a/src/core/renderer/MCHTMLRenderer.cc
+++ b/src/core/renderer/MCHTMLRenderer.cc
@@ -357,7 +357,8 @@ static String * htmlForAbstractMessagePart(AbstractMessagePart * part, htmlRende
return NULL;
}
String * substring = htmlForAbstractPart(part->mainPart(), context);
- MCAssert(substring != NULL);
+ if (substring == NULL)
+ return NULL;
HashMap * values = context->htmlCallback->templateValuesForHeader(part->header());
String * headerString = renderTemplate(context->htmlCallback->templateForEmbeddedMessageHeader(part->header()), values);