Changeset 1818 in josm


Ignore:
Timestamp:
2009-07-20T21:43:37+02:00 (15 years ago)
Author:
jttt
Message:

Fix #3010 - NPE at PluginSelection

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginSelection.java

    r1769 r1818  
    6767        for (String pluginName : Main.pref.getCollection("plugins", Collections.<String>emptySet())) {
    6868            PluginInformation local = localPlugins.get(pluginName);
    69             PluginInformation description = availablePlugins.get(local.name);
    70 
    71             if (description.version != null && !description.version.equals(local.version)) {
     69            PluginInformation description = availablePlugins.get(pluginName);
     70
     71            if (description == null) {
     72                System.out.println(tr("Plug-in named {0} is not available. Update skipped.", pluginName));
     73                continue;
     74            }
     75
     76            if (local == null || (description.version != null && !description.version.equals(local.version))) {
    7277                toUpdate.add(description);
    73                 toUpdateStr.append(description.name+"\n");
     78                toUpdateStr.append(pluginName+"\n");
    7479            }
    7580        }
  • trunk/test

    • Property svn:ignore set to
      build

      report
Note: See TracChangeset for help on using the changeset viewer.