Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 9318)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 9319)
@@ -298,6 +298,5 @@
             }
             final int rowIdx = model.getRowCount()-1;
-            String key = ((TagModel) model.getValueAt(rowIdx, 0)).getName();
-            if (!key.trim().isEmpty()) {
+            if (rowIdx < 0 || !((TagModel) model.getValueAt(rowIdx, 0)).getName().trim().isEmpty()) {
                 model.appendNewTag();
             }
