From fb02b1955ace2465011c0c44c0eb986fc0966e57 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 5 Dec 2008 16:20:18 +0000 Subject: [PATCH] minor - avoid NPE. --- .../WEB-INF/src/org/adempiere/webui/window/WImageDialog.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java b/zkwebui/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java index 20c10851f8..a9b7446fac 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java @@ -207,7 +207,10 @@ public class WImageDialog extends Window implements EventListener // Save info m_mImage.setName(fileName); m_mImage.setImageURL(fileName); - m_mImage.setBinaryData(image.getContent().getByteData()); + if (image.getContent() != null) + m_mImage.setBinaryData(image.getContent().getByteData()); + else + m_mImage.setBinaryData(null); } // cmd_file /**