Ghidra is a software reverse engineering (SRE) framework
Test fixes
dragonmacherfedb08c8453f
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/CodeUnitTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/CodeUnitTableColumn.javaindex 786c09dfb4..30305591c3 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/CodeUnitTableColumn.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/CodeUnitTableColumn.java@@ -4,9 +4,9 @@* Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at- *+ ** http://www.apache.org/licenses/LICENSE-2.0- *+ ** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.@@ -61,6 +61,10 @@ public class CodeUnitTableColumn@Overridepublic CodeUnitTableCellData getValue(ProgramLocation rowObject, Settings settings,Program data, ServiceProvider serviceProvider) throws IllegalArgumentException {+ if (rowObject == null) {+ return null; // This can happen when using mapped table columns+ }+ProgramLocation loc = rowObject;return new CodeUnitTableCellData(loc, getCodeUnitFormat(serviceProvider),CODE_UNIT_OFFSET.getOffset(settings), CODE_UNIT_COUNT.getCount(settings));diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/LabelTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/LabelTableColumn.javaindex ae3579f980..d6ad39996a 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/LabelTableColumn.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/LabelTableColumn.java@@ -4,9 +4,9 @@* Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at- *+ ** http://www.apache.org/licenses/LICENSE-2.0- *+ ** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.@@ -51,6 +51,10 @@ public class LabelTableColumn@Overridepublic String getValue(ProgramLocation rowObject, Settings settings, Program program,ServiceProvider serviceProvider) throws IllegalArgumentException {+ if (rowObject == null) {+ return null; // This can happen when using mapped table columns+ }+if (rowObject instanceof LabelFieldLocation) {LabelFieldLocation labelFieldLocation = (LabelFieldLocation) rowObject;return labelFieldLocation.getSymbolPath().getName();@@ -70,6 +74,12 @@ public class LabelTableColumnprivate Symbol getSymbol(ProgramLocation rowObject, Program program)throws IllegalArgumentException {+ if (rowObject == null) {+ // this can happen when a bookmark is deleted and we use a mapping column that can no+ // longer find the bookmark for the BookmarkRowObject+ return null;+ }+ProgramLocation location = rowObject;if (rowObject instanceof VariableLocation) {Variable var = ((VariableLocation) rowObject).getVariable();diff --git a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/MappedTableColumn.java b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/MappedTableColumn.javaindex 5455b88af1..2a07d7db64 100644--- a/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/MappedTableColumn.java+++ b/Ghidra/Framework/Docking/src/main/java/docking/widgets/table/MappedTableColumn.java@@ -125,6 +125,9 @@ public class MappedTableColumn<ROW_TYPE, EXPECTED_ROW_TYPE, COLUMN_TYPE, DATA_SOServiceProvider serviceProvider) throws IllegalArgumentException {EXPECTED_ROW_TYPE mappedRowObject = map(rowObject, data, serviceProvider);+ if (mappedRowObject == null) {+ return null;+ }return tableColumn.getValue(mappedRowObject, settings, data, serviceProvider);}