Index: /applications/editors/josm/plugins/trustosm/build.xml
===================================================================
--- /applications/editors/josm/plugins/trustosm/build.xml	(revision 30743)
+++ /applications/editors/josm/plugins/trustosm/build.xml	(revision 30744)
@@ -101,6 +101,6 @@
                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
                 <attribute name="Plugin-Description" value="Plugin to digital sign OSM-Data"/>
-                <attribute name="Plugin-Icon" value="trustosm"/>
-                <attribute name="Plugin-Link" value="..."/>
+                <attribute name="Plugin-Icon" value="images/trustosm.png"/>
+                <!--<attribute name="Plugin-Link" value="..."/>-->
                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
Index: /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustSignatures.java
===================================================================
--- /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustSignatures.java	(revision 30743)
+++ /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustSignatures.java	(revision 30744)
@@ -127,22 +127,25 @@
         if (textsigs.containsKey(plain)){
             List<PGPSignature> l = textsigs.get(plain);
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            try (ArmoredOutputStream aOut = new ArmoredOutputStream(baos)) {
-                aOut.beginClearText(l.get(0).getHashAlgorithm());
-                aOut.write(plain.getBytes(Charset.forName("UTF-8")));
-                aOut.write('\n');
-                aOut.endClearText();
+            PGPSignature first = l.get(0);
+            if (first != null) {
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                try (ArmoredOutputStream aOut = new ArmoredOutputStream(baos)) {
+                    aOut.beginClearText(first.getHashAlgorithm());
+                    aOut.write(plain.getBytes(Charset.forName("UTF-8")));
+                    aOut.write('\n');
+                    aOut.endClearText();
 
-                try (BCPGOutputStream bOut = new BCPGOutputStream(aOut)) {
-                    for (PGPSignature sig : l) {
-                        sig.encode(bOut);
+                    try (BCPGOutputStream bOut = new BCPGOutputStream(aOut)) {
+                        for (PGPSignature sig : l) {
+                            sig.encode(bOut);
+                        }
                     }
+
+                    return baos.toString("UTF-8");
+
+                } catch (Exception e) {
+                    Main.error(e);
+                    return "Error - read console Output";
                 }
-
-                return baos.toString("UTF-8");
-
-            } catch (Exception e) {
-                Main.error(e);
-                return "Error - read console Output";
             }
         }
Index: /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/KeyTreeTableModel.java
===================================================================
--- /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/KeyTreeTableModel.java	(revision 30743)
+++ /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/KeyTreeTableModel.java	(revision 30744)
@@ -42,13 +42,15 @@
     public KeyTreeTableModel(Collection<PGPSignature> sigs) {
         root = new SignatureTreeNode();
-        for (PGPSignature s : sigs){
-            SignatureTreeNode sn = new SignatureTreeNode(s);
-            PGPPublicKey pub = TrustOSMplugin.gpg.getPublicKeyFromRing(s.getKeyID());
-            Iterator<?> iter = pub.getSignatures();
-            while (iter.hasNext()){
-                PGPSignature ks = (PGPSignature)iter.next();
-                sn.getChildren().add(new SignatureTreeNode(ks));
+        for (PGPSignature s : sigs) {
+            if (s != null) {
+                SignatureTreeNode sn = new SignatureTreeNode(s);
+                PGPPublicKey pub = TrustOSMplugin.gpg.getPublicKeyFromRing(s.getKeyID());
+                Iterator<?> iter = pub.getSignatures();
+                while (iter.hasNext()){
+                    PGPSignature ks = (PGPSignature)iter.next();
+                    sn.getChildren().add(new SignatureTreeNode(ks));
+                }
+                root.getChildren().add(sn);
             }
-            root.getChildren().add(sn);
         }
     }
Index: /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java
===================================================================
--- /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java	(revision 30743)
+++ /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java	(revision 30744)
@@ -331,9 +331,11 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            for (OsmPrimitive osm : osmData) {
-                String id = TrustOsmPrimitive.createUniqueObjectIdentifier(osm);
-                if (TrustOSMplugin.signedItems.containsKey(id))
-                    TrustAnalyzer.checkEverything(TrustOSMplugin.signedItems.get(id));
-                //checkedItems.put(osm, TrustOSMplugin.gpg.check(checkedItems.containsKey(osm)? checkedItems.get(osm) : new TrustOSMItem(osm)));
+            if (osmData != null) {
+                for (OsmPrimitive osm : osmData) {
+                    String id = TrustOsmPrimitive.createUniqueObjectIdentifier(osm);
+                    if (TrustOSMplugin.signedItems.containsKey(id))
+                        TrustAnalyzer.checkEverything(TrustOSMplugin.signedItems.get(id));
+                    //checkedItems.put(osm, TrustOSMplugin.gpg.check(checkedItems.containsKey(osm)? checkedItems.get(osm) : new TrustOSMItem(osm)));
+                }
             }
             updateTable();
@@ -350,12 +352,14 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            for (int i : propertyTable.getSelectedRows()) {
-                String key = (String)propertyTable.getValueAt(i, 0);
-                for (OsmPrimitive osm : osmData) {
-                    if (osm.keySet().contains(key)) {
-                        String id = TrustOsmPrimitive.createUniqueObjectIdentifier(osm);
-                        TrustOsmPrimitive trust = TrustOSMplugin.signedItems.containsKey(id)? TrustOSMplugin.signedItems.get(id) : TrustOsmPrimitive.createTrustOsmPrimitive(osm);
-                        if (TrustOSMplugin.gpg.signTag(trust, key))
-                            TrustOSMplugin.signedItems.put(id, trust);
+            if (osmData != null) {
+                for (int i : propertyTable.getSelectedRows()) {
+                    String key = (String)propertyTable.getValueAt(i, 0);
+                    for (OsmPrimitive osm : osmData) {
+                        if (osm.keySet().contains(key)) {
+                            String id = TrustOsmPrimitive.createUniqueObjectIdentifier(osm);
+                            TrustOsmPrimitive trust = TrustOSMplugin.signedItems.containsKey(id)? TrustOSMplugin.signedItems.get(id) : TrustOsmPrimitive.createTrustOsmPrimitive(osm);
+                            if (TrustOSMplugin.gpg.signTag(trust, key))
+                                TrustOSMplugin.signedItems.put(id, trust);
+                        }
                     }
                 }
@@ -421,10 +425,12 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            for (int i : propertyTable.getSelectedRows()) {
-                String key = (String)propertyTable.getValueAt(i, 0);
-                for (OsmPrimitive osm : osmData) {
-                    String id = TrustOsmPrimitive.createUniqueObjectIdentifier(osm);
-                    if (osm.keySet().contains(key) && TrustOSMplugin.signedItems.containsKey(id)) {
-                        TrustSignaturesDialog.showSignaturesDialog(TrustOSMplugin.signedItems.get(id), key);
+            if (osmData != null) {
+                for (int i : propertyTable.getSelectedRows()) {
+                    String key = (String)propertyTable.getValueAt(i, 0);
+                    for (OsmPrimitive osm : osmData) {
+                        String id = TrustOsmPrimitive.createUniqueObjectIdentifier(osm);
+                        if (osm.keySet().contains(key) && TrustOSMplugin.signedItems.containsKey(id)) {
+                            TrustSignaturesDialog.showSignaturesDialog(TrustOSMplugin.signedItems.get(id), key);
+                        }
                     }
                 }
@@ -556,66 +562,67 @@
         boolean sigsAvailable = false;
 
-        for (OsmPrimitive osm : osmData) {
-            String id = TrustOsmPrimitive.createUniqueObjectIdentifier(osm);
-            if (TrustOSMplugin.signedItems.containsKey(id)) {
-                trust = TrustOSMplugin.signedItems.get(id);
-                sigsAvailable = true;
-                /*
-                Map<String,String> tags = osm.getKeys();
-                Map<String, TrustSignatures>  signedTags = trust.getTagSigs();
-                HashSet<String> removedKeys = new HashSet<String>(signedTags.keySet());
-                removedKeys.removeAll(tags.keySet());
-                for (String removedKey: removedKeys) {
-                    TrustSignatures sigs = signedTags.get(removedKey);
-                    sigs.setStatus( TrustSignatures.ITEM_REMOVED );
-                    String[] kv = TrustOsmPrimitive.generateTagsFromSigtext(sigs.getOnePlainText());
-                    tags.put(kv[0],kv[1]);
-                }
-                 */
-            } else {
-                trust = TrustOsmPrimitive.createTrustOsmPrimitive(osm);
-                sigsAvailable = false;
-            }
-
-            //        trust = TrustOSMplugin.signedItems.containsKey(osm) ? TrustOSMplugin.signedItems.get(osm) : new TrustOSMItem(osm);
-
-            for (String key: osm.keySet()) {
-                String value = osm.get(key);
-                //keyCount.put(key, keyCount.containsKey(key) ? keyCount.get(key) + 1 : 1);
-
-                byte status = sigsAvailable && trust.getTagSigs().containsKey(key) ? trust.getTagSigs().get(key).getStatus() : TrustSignatures.SIG_UNKNOWN ;
-                Byte oldstatus = rowStatus.containsKey(key)? rowStatus.get(key) : new Byte(TrustSignatures.SIG_VALID);
-                Byte sigstatus = new Byte(status);
-                Byte newstatus;
-                if (sigstatus.equals(new Byte(TrustSignatures.SIG_BROKEN)) || oldstatus.equals(new Byte(TrustSignatures.SIG_BROKEN))) {
-                    newstatus = new Byte(TrustSignatures.SIG_BROKEN);
-                } else if (sigstatus.equals(new Byte(TrustSignatures.SIG_UNKNOWN)) || oldstatus.equals(new Byte(TrustSignatures.SIG_UNKNOWN))) {
-                    newstatus = new Byte(TrustSignatures.SIG_UNKNOWN);
-                } else newstatus = new Byte(TrustSignatures.SIG_VALID);
-
-                rowStatus.put(key, newstatus );
-                if (valueCount.containsKey(key)) {
-                    Map<String, Integer> v = valueCount.get(key);
-                    v.put(value, v.containsKey(value)? v.get(value) + 1 : 1 );
+        if (osmData != null) {
+            for (OsmPrimitive osm : osmData) {
+                String id = TrustOsmPrimitive.createUniqueObjectIdentifier(osm);
+                if (TrustOSMplugin.signedItems.containsKey(id)) {
+                    trust = TrustOSMplugin.signedItems.get(id);
+                    sigsAvailable = true;
+                    /*
+                    Map<String,String> tags = osm.getKeys();
+                    Map<String, TrustSignatures>  signedTags = trust.getTagSigs();
+                    HashSet<String> removedKeys = new HashSet<String>(signedTags.keySet());
+                    removedKeys.removeAll(tags.keySet());
+                    for (String removedKey: removedKeys) {
+                        TrustSignatures sigs = signedTags.get(removedKey);
+                        sigs.setStatus( TrustSignatures.ITEM_REMOVED );
+                        String[] kv = TrustOsmPrimitive.generateTagsFromSigtext(sigs.getOnePlainText());
+                        tags.put(kv[0],kv[1]);
+                    }
+                     */
                 } else {
-                    TreeMap<String,Integer> v = new TreeMap<>();
-                    v.put(value, 1);
-                    valueCount.put(key, v);
-                }
-            }
-        }
-        for (Entry<String, Map<String, Integer>> e : valueCount.entrySet()) {
-            int count=0;
-            for (Entry<String, Integer> e1: e.getValue().entrySet()) {
-                count+=e1.getValue();
-            }
-            if (count < osmData.size()) {
-                e.getValue().put("", osmData.size()-count);
-            }
-            propertyData.addRow(new Object[]{e.getKey(), e.getValue()});
-        }
-
-
-        boolean hasSelection = !osmData.isEmpty();
+                    trust = TrustOsmPrimitive.createTrustOsmPrimitive(osm);
+                    sigsAvailable = false;
+                }
+
+                //        trust = TrustOSMplugin.signedItems.containsKey(osm) ? TrustOSMplugin.signedItems.get(osm) : new TrustOSMItem(osm);
+
+                for (String key: osm.keySet()) {
+                    String value = osm.get(key);
+                    //keyCount.put(key, keyCount.containsKey(key) ? keyCount.get(key) + 1 : 1);
+
+                    byte status = sigsAvailable && trust.getTagSigs().containsKey(key) ? trust.getTagSigs().get(key).getStatus() : TrustSignatures.SIG_UNKNOWN ;
+                    Byte oldstatus = rowStatus.containsKey(key)? rowStatus.get(key) : new Byte(TrustSignatures.SIG_VALID);
+                    Byte sigstatus = new Byte(status);
+                    Byte newstatus;
+                    if (sigstatus.equals(new Byte(TrustSignatures.SIG_BROKEN)) || oldstatus.equals(new Byte(TrustSignatures.SIG_BROKEN))) {
+                        newstatus = new Byte(TrustSignatures.SIG_BROKEN);
+                    } else if (sigstatus.equals(new Byte(TrustSignatures.SIG_UNKNOWN)) || oldstatus.equals(new Byte(TrustSignatures.SIG_UNKNOWN))) {
+                        newstatus = new Byte(TrustSignatures.SIG_UNKNOWN);
+                    } else newstatus = new Byte(TrustSignatures.SIG_VALID);
+
+                    rowStatus.put(key, newstatus );
+                    if (valueCount.containsKey(key)) {
+                        Map<String, Integer> v = valueCount.get(key);
+                        v.put(value, v.containsKey(value)? v.get(value) + 1 : 1 );
+                    } else {
+                        TreeMap<String,Integer> v = new TreeMap<>();
+                        v.put(value, 1);
+                        valueCount.put(key, v);
+                    }
+                }
+            }
+            for (Entry<String, Map<String, Integer>> e : valueCount.entrySet()) {
+                int count=0;
+                for (Entry<String, Integer> e1: e.getValue().entrySet()) {
+                    count+=e1.getValue();
+                }
+                if (count < osmData.size()) {
+                    e.getValue().put("", osmData.size()-count);
+                }
+                propertyData.addRow(new Object[]{e.getKey(), e.getValue()});
+            }
+        }
+
+        boolean hasSelection = osmData != null && !osmData.isEmpty();
         boolean hasTags = hasSelection && propertyData.getRowCount() > 0;
 
Index: /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustSignaturesDialog.java
===================================================================
--- /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustSignaturesDialog.java	(revision 30743)
+++ /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustSignaturesDialog.java	(revision 30744)
@@ -89,7 +89,7 @@
                 }
             });
-            t.setLeafIcon(ImageProvider.get("dialogs/sign"));
-            t.setOpenIcon(ImageProvider.get("dialogs/sign_color"));
-            t.setClosedIcon(ImageProvider.get("dialogs/sign_color"));
+            t.setLeafIcon(ImageProvider.get("sign"));
+            t.setOpenIcon(ImageProvider.get("sign_color"));
+            t.setClosedIcon(ImageProvider.get("sign_color"));
             t.expandAll();
             t.packAll();
Index: /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java
===================================================================
--- /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java	(revision 30743)
+++ /applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java	(revision 30744)
@@ -136,5 +136,7 @@
                 generateKey();
             } catch (Exception e) {
-                System.err.println("GPG Key Ring File could not be created in: "+Main.pref.getPluginsDirectory().getPath() + "/trustosm/gnupg/secring.gpg");
+                Main.error(e);
+                Main.error("GPG Key Ring File could not be created in: "+
+                        Main.pref.getPluginsDirectory().getPath() + "/trustosm/gnupg/secring.gpg");
             }
         }
