From 579d32869b1dbe4747ca37269c558b01495adb07 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 11 Jul 2014 12:51:46 +0800 Subject: [PATCH] IDEMPIERE-724 Ticket #1004142: Null Data error --- .../src/org/adempiere/webui/theme/ThemeManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java index 7912eaaa8c..5d601bb591 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java @@ -118,8 +118,11 @@ public final class ThemeManager { public static org.zkoss.image.Image getClientWebLogo() throws IOException { MClientInfo cinfo = MClientInfo.get(Env.getCtx()); if (cinfo.getLogoWeb_ID() > 0) { - MImage mImage = MImage.get(Env.getCtx(), cinfo.getLogoWeb_ID()); - return new AImage(mImage.getName(), mImage.getData()); + MImage mImage = MImage.get(Env.getCtx(), cinfo.getLogoWeb_ID()); + if (mImage.getData() != null) + return new AImage(mImage.getName(), mImage.getData()); + else + return null; /* Using different approach: ImageEncoder supports only PNG and JPEG Image image = mImage.getImage();