From 96dd2d3f665b5f4798e634a74799170ebdbe871c Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Wed, 23 Apr 2008 13:05:20 +0000 Subject: [PATCH] BF [ 1949649 ] MPrintFormat.get() should return null if not found --- base/src/org/compiere/print/MPrintFormat.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/src/org/compiere/print/MPrintFormat.java b/base/src/org/compiere/print/MPrintFormat.java index bff861b04d..ab601812aa 100644 --- a/base/src/org/compiere/print/MPrintFormat.java +++ b/base/src/org/compiere/print/MPrintFormat.java @@ -799,7 +799,10 @@ public class MPrintFormat extends X_AD_PrintFormat if (pf == null) { pf = new MPrintFormat (ctx, AD_PrintFormat_ID, null); - s_formats.put(key, pf); + if (pf.get_ID() <= 0) + pf = null; + else + s_formats.put(key, pf); } return pf; } // get