Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2022-06-03 05:10:43 +0000
committerDirk Fauth2022-06-03 05:10:43 +0000
commitcd7b01258cdd4db372369cb919e0e87d011a380d (patch)
treefb9ee9ce340ca2de0a23cf6b81d555376c94d9c5
parent1057bb9780955dfbf86bc9abf99eafb26294b574 (diff)
downloadorg.eclipse.nebula.widgets.nattable-cd7b01258cdd4db372369cb919e0e87d011a380d.tar.gz
org.eclipse.nebula.widgets.nattable-cd7b01258cdd4db372369cb919e0e87d011a380d.tar.xz
org.eclipse.nebula.widgets.nattable-cd7b01258cdd4db372369cb919e0e87d011a380d.zip
Bug 580072 - RowIdHideShowLayer causes NPE when combined with
SummaryRowLayer Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com> Change-Id: I78c46e570a9b64bd262cd42688e008baf5300498
-rw-r--r--org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/hideshow/RowIdHideShowLayer.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/hideshow/RowIdHideShowLayer.java b/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/hideshow/RowIdHideShowLayer.java
index d20e050f..43dbafc8 100644
--- a/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/hideshow/RowIdHideShowLayer.java
+++ b/org.eclipse.nebula.widgets.nattable.core/src/org/eclipse/nebula/widgets/nattable/hideshow/RowIdHideShowLayer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018, 2020 Dirk Fauth.
+ * Copyright (c) 2018, 2022 Dirk Fauth.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
@@ -188,7 +188,9 @@ public class RowIdHideShowLayer<T> extends AbstractRowHideShowLayer implements I
public boolean isRowIndexHidden(int rowIndex) {
if (rowIndex >= 0) {
T rowObject = getRowObjectByIndex(rowIndex);
- return this.hiddenRows.containsKey(this.rowIdAccessor.getRowId(rowObject));
+ if (rowObject != null) {
+ return this.hiddenRows.containsKey(this.rowIdAccessor.getRowId(rowObject));
+ }
}
return false;
}

Back to the top