diff --git a/client/src/org/compiere/minigrid/MiniTable.java b/client/src/org/compiere/minigrid/MiniTable.java
index 37706d0496..3d50e63c1c 100644
--- a/client/src/org/compiere/minigrid/MiniTable.java
+++ b/client/src/org/compiere/minigrid/MiniTable.java
@@ -44,6 +44,9 @@ import org.compiere.util.*;
*
* @author Jorg Janke
* @version $Id: MiniTable.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
+ *
+ * @author Teo Sarca, SC ARHIPAC SERVICE SRL
+ *
BF [ 1891082 ] NPE on MiniTable when you hide some columns
*/
public class MiniTable extends CTable
{
@@ -117,8 +120,10 @@ public class MiniTable extends CTable
renderer = getCellRenderer(row, col);
comp = renderer.getTableCellRendererComponent
(this, getValueAt(row, col), false, false, row, col);
- int rowWidth = comp.getPreferredSize().width + SLACK;
- width = Math.max(width, rowWidth);
+ if (comp != null) {
+ int rowWidth = comp.getPreferredSize().width + SLACK;
+ width = Math.max(width, rowWidth);
+ }
}
// Width not greater ..
width = Math.min(MAXSIZE, width);