Index: /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java
===================================================================
--- /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java	(revision 33262)
+++ /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/UndeleteAction.java	(revision 33263)
@@ -65,4 +65,9 @@
                         History h = HistoryDataSet.getInstance().getHistory(id, type);
 
+                        if (h == null) {
+                            Main.warn("Cannot find history for " + type + " " + id);
+                            return;
+                        }
+
                         HistoryOsmPrimitive hPrimitive1 = h.getLatest();
                         HistoryOsmPrimitive hPrimitive2;
@@ -117,5 +122,4 @@
 
                                 Relation rel = new Relation(id, (int) hPrimitive1.getVersion());
-
                                 HistoryRelation hRel = (HistoryRelation) hPrimitive2;
 
@@ -142,8 +146,6 @@
                                         members.add(new RelationMember(m.getRole(), p));
                                     }
-
                                     rel.setMembers(members);
                                 }
-
                                 primitive = rel;
                             }
@@ -166,10 +168,5 @@
                                   ? tr("Unable to undelete relation {0}. Object has likely been redacted", id)
                                   : null;
-                                GuiHelper.runInEDT(new Runnable() {
-                                    @Override
-                                    public void run() {
-                                        new Notification(msg).setIcon(JOptionPane.WARNING_MESSAGE).show();
-                                    }
-                                });
+                                GuiHelper.runInEDT(() -> new Notification(msg).setIcon(JOptionPane.WARNING_MESSAGE).show());
                                 Main.warn(msg);
                             }
@@ -187,10 +184,5 @@
                 Main.map.repaint();
             }
-            GuiHelper.runInEDT(new Runnable() {
-                @Override
-                public void run() {
-                    AutoScaleAction.zoomTo(layer.data.allNonDeletedPrimitives());
-                }
-            });
+            GuiHelper.runInEDT(() -> AutoScaleAction.zoomTo(layer.data.allNonDeletedPrimitives()));
         }
     }
