IDEMPIERE-517 Packout is throwing Null Pointer exception on image

This commit is contained in:
Heng Sin Low 2012-11-26 12:39:24 +08:00
parent f8c002536e
commit a7b786a446
1 changed files with 6 additions and 0 deletions

View File

@ -134,6 +134,9 @@ public class WindowElementHandler extends AbstractElementHandler {
//export color
if (m_Window.getAD_Color_ID() > 0) {
ElementHandler handler = ctx.packOut.getHandler(I_AD_Color.Table_Name);
if (handler == null) {
handler = new GenericPOElementHandler(I_AD_Color.Table_Name);
}
try {
handler.packOut(ctx.packOut, document, null, m_Window.getAD_Color_ID());
} catch (Exception e) {
@ -144,6 +147,9 @@ public class WindowElementHandler extends AbstractElementHandler {
//export image
if (m_Window.getAD_Image_ID() > 0) {
ElementHandler handler = ctx.packOut.getHandler(I_AD_Image.Table_Name);
if (handler == null) {
handler = new GenericPOElementHandler(I_AD_Image.Table_Name);
}
try {
handler.packOut(ctx.packOut, document, null, m_Window.getAD_Image_ID());
} catch (Exception e) {