From 94a80882a56302aa3447ba3ad925ce278f6629fc Mon Sep 17 00:00:00 2001 From: georgweiss Date: Mon, 25 Mar 2024 20:03:06 +0100 Subject: [PATCH] Add null check when restoring snapshot containing disconnected items --- .../ui/snapshot/SnapshotTableViewController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/save-and-restore/app/src/main/java/org/phoebus/applications/saveandrestore/ui/snapshot/SnapshotTableViewController.java b/app/save-and-restore/app/src/main/java/org/phoebus/applications/saveandrestore/ui/snapshot/SnapshotTableViewController.java index 267d4e0642..7557728093 100644 --- a/app/save-and-restore/app/src/main/java/org/phoebus/applications/saveandrestore/ui/snapshot/SnapshotTableViewController.java +++ b/app/save-and-restore/app/src/main/java/org/phoebus/applications/saveandrestore/ui/snapshot/SnapshotTableViewController.java @@ -353,7 +353,9 @@ public void restore(Snapshot snapshot, Consumer> completion) { for (SnapshotItem entry : snapshot.getSnapshotData().getSnapshotItems()) { TableEntry e = tableEntryItems.get(getPVKey(entry.getConfigPv().getPvName(), entry.getConfigPv().isReadOnly())); - boolean restorable = e.selectedProperty().get() && !e.readOnlyProperty().get() && + boolean restorable = e.selectedProperty().get() && + !e.readOnlyProperty().get() && + entry.getValue() != null && !entry.getValue().equals(VNoData.INSTANCE); if (restorable) {