Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 14144)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 14145)
@@ -275,8 +275,8 @@
      * @return A set of all existing directories where resources could be stored.
      */
-    public Collection<String> getAllPossiblePreferenceDirs() {
+    public static Collection<String> getAllPossiblePreferenceDirs() {
         Set<String> locations = new HashSet<>();
-        addPossibleResourceDir(locations, dirs.getPreferencesDirectory(false).getPath());
-        addPossibleResourceDir(locations, dirs.getUserDataDirectory(false).getPath());
+        addPossibleResourceDir(locations, Config.getDirs().getPreferencesDirectory(false).getPath());
+        addPossibleResourceDir(locations, Config.getDirs().getUserDataDirectory(false).getPath());
         addPossibleResourceDir(locations, getSystemEnv("JOSM_RESOURCES"));
         addPossibleResourceDir(locations, getSystemProperty("josm.resources"));
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 14144)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 14145)
@@ -26,5 +26,5 @@
 import javax.swing.ImageIcon;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.Version;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -416,5 +416,5 @@
      */
     public static Collection<String> getPluginLocations() {
-        Collection<String> locations = Main.pref.getAllPossiblePreferenceDirs();
+        Collection<String> locations = Preferences.getAllPossiblePreferenceDirs();
         Collection<String> all = new ArrayList<>(locations.size());
         for (String s : locations) {
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 14144)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 14145)
@@ -61,5 +61,5 @@
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -1244,13 +1244,11 @@
 
         // Try all other resource directories
-        if (Main.pref != null) {
-            for (String location : Main.pref.getAllPossiblePreferenceDirs()) {
-                u = getImageUrl(location + "images", imageName);
-                if (u != null)
-                    return u;
-                u = getImageUrl(location, imageName);
-                if (u != null)
-                    return u;
-            }
+        for (String location : Preferences.getAllPossiblePreferenceDirs()) {
+            u = getImageUrl(location + "images", imageName);
+            if (u != null)
+                return u;
+            u = getImageUrl(location, imageName);
+            if (u != null)
+                return u;
         }
 
