Index: /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 11795)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 11796)
@@ -184,12 +184,14 @@
                 case SUCCESS:
                     handleNoTileAtZoom();
-                    int httpStatusCode = attributes.getResponseCode();
-                    if (httpStatusCode >= 400 && !isNoTileAtZoom()) {
-                        if (attributes.getErrorMessage() == null) {
-                            tile.setError(tr("HTTP error {0} when loading tiles", httpStatusCode));
-                        } else {
-                            tile.setError(tr("Error downloading tiles: {0}", attributes.getErrorMessage()));
+                    if (attributes != null) {
+                        int httpStatusCode = attributes.getResponseCode();
+                        if (httpStatusCode >= 400 && !isNoTileAtZoom()) {
+                            if (attributes.getErrorMessage() == null) {
+                                tile.setError(tr("HTTP error {0} when loading tiles", httpStatusCode));
+                            } else {
+                                tile.setError(tr("Error downloading tiles: {0}", attributes.getErrorMessage()));
+                            }
+                            status = false;
                         }
-                        status = false;
                     }
                     status &= tryLoadTileImage(object); //try to keep returned image as background
Index: /trunk/src/org/openstreetmap/josm/data/osm/Node.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Node.java	(revision 11795)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Node.java	(revision 11796)
@@ -403,5 +403,5 @@
             return true;
         }
-        if (hops > 0) {
+        if (hops > 0 && visited != null) {
             visited.add(this);
             for (final Way w : Utils.filteredCollection(this.getReferrers(), Way.class)) {
Index: /trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java	(revision 11795)
+++ /trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java	(revision 11796)
@@ -86,5 +86,7 @@
 
                 // Fire consolidated event
-                fireConsolidatedEvents(inEDTListeners, consolidatedEvent);
+                if (consolidatedEvent != null) {
+                    fireConsolidatedEvents(inEDTListeners, consolidatedEvent);
+                }
             }
         }
Index: /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 11795)
+++ /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 11796)
@@ -15,4 +15,5 @@
 import java.util.Collection;
 import java.util.Date;
+import java.util.Objects;
 import java.util.Optional;
 import java.util.TreeSet;
@@ -657,4 +658,5 @@
      */
     public static String explainOsmTransferException(OsmTransferException e) {
+        Objects.requireNonNull(e, "e");
         if (getNestedException(e, SecurityException.class) != null)
             return explainSecurityException(e);
