IDEMPIERE-724 Ticket #1004142: Null Data error

This commit is contained in:
Elaine Tan 2014-07-11 12:51:46 +08:00
parent afca73d7b8
commit 579d32869b
1 changed files with 5 additions and 2 deletions

View File

@ -119,7 +119,10 @@ public final class ThemeManager {
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());
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();