Browse Source

Work around for config stats NPE

Potentially fixes issue 722

git-svn-id: http://svn.dmdirc.com/trunk@3482 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Chris Smith 16 years ago
parent
commit
df06b574b9
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/com/dmdirc/config/ConfigManager.java

+ 5
- 1
src/com/dmdirc/config/ConfigManager.java View File

@@ -318,7 +318,11 @@ public class ConfigManager extends ConfigSource implements Serializable,
318 318
     protected static void doStats(final String domain, final String option) {
319 319
         final String key = domain + "." + option;
320 320
         
321
-        stats.put(key, 1 + (stats.containsKey(key) ? stats.get(key) : 0));
321
+        if (stats != null) {
322
+            // Don't ask how it's null, but it is.
323
+            
324
+            stats.put(key, 1 + (stats.containsKey(key) ? stats.get(key) : 0));
325
+        }
322 326
     }
323 327
     
324 328
     /**

Loading…
Cancel
Save