Index: /trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 565)
+++ /trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 566)
@@ -40,5 +40,5 @@
 		/* scan the paste buffer, and add tags to each of the selected objects. 
 		 * If a tag already exists, it is overwritten */
-		if (! selectionSubset.isEmpty()) {
+		if (selectionSubset != null && ! selectionSubset.isEmpty()) {
 			for (Iterator<? extends OsmPrimitive> it = pasteBufferSubset.iterator(); it.hasNext();) {
 				OsmPrimitive osm = it.next();
@@ -65,5 +65,5 @@
 		for (Iterator<? extends OsmPrimitive> it = osms.iterator(); it.hasNext();) {
 			OsmPrimitive osm = it.next();
-			if (osm.keys.isEmpty())
+			if (osm.keys == null || osm.keys.isEmpty())
 				continue;
 			for (String key : osm.keys.keySet()) {
@@ -88,5 +88,6 @@
 		/* only enable if there is something selected to paste into and 
 			if we don't have conflicting keys in the pastebuffer */
-		setEnabled(! selection.isEmpty() &&
+		setEnabled(selection != null &&
+				! selection.isEmpty() &&
 				! pasteBuffer.allPrimitives().isEmpty() && 
 				(Main.ds.getSelectedNodes().isEmpty() ||
