Fix NullPointerException in BundleStatusTableModel.bundleBuilt

getStatus(bundle) returns null when the built bundle is not tracked in
the table model's map (e.g. a bundle built programmatically rather than
added through the Bundle Manager). The bundleBuilt handler dereferenced
it unconditionally, throwing an uncaught NPE on the Swing thread.

Guard the status the same way bundleException() already does.
This commit is contained in:
Saverio Miroddi
2026-07-23 03:30:28 +02:00
parent 7e89d94e34
commit 21732f9390

View File

@@ -300,9 +300,11 @@ public class BundleStatusTableModel
if (summary != null) {
Swing.runLater(() -> {
BundleStatus status = getStatus(bundle);
status.setSummary(summary);
int rowIndex = getRowIndex(status);
fireTableRowsUpdated(rowIndex, rowIndex);
if (status != null) {
status.setSummary(summary);
int rowIndex = getRowIndex(status);
fireTableRowsUpdated(rowIndex, rowIndex);
}
});
}
}