You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2012/10/20 13:34:26 UTC
svn commit: r1400421 -
/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
Author: adrianc
Date: Sat Oct 20 11:34:26 2012
New Revision: 1400421
URL: http://svn.apache.org/viewvc?rev=1400421&view=rev
Log:
Fixed NPE in Content component.
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java?rev=1400421&r1=1400420&r2=1400421&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java Sat Oct 20 11:34:26 2012
@@ -818,8 +818,10 @@ public class DataResourceWorker impleme
writeText(dataResource, text, templateContext, mimeTypeId, locale, out);
} else if ("ELECTRONIC_TEXT".equals(dataResourceTypeId)) {
GenericValue electronicText = delegator.findOne("ElectronicText", UtilMisc.toMap("dataResourceId", dataResourceId), cache);
- String text = electronicText.getString("textData");
- writeText(dataResource, text, templateContext, mimeTypeId, locale, out);
+ if (electronicText != null) {
+ String text = electronicText.getString("textData");
+ writeText(dataResource, text, templateContext, mimeTypeId, locale, out);
+ }
// object types
} else if (dataResourceTypeId.endsWith("_OBJECT")) {