JAL-3253/JAL-3257
[jalview.git] / src / jalview / bin / Cache.java
index 09f8de7..ee97b7f 100755 (executable)
@@ -708,7 +708,7 @@ public class Cache
     try
     {
       oldValue = applicationProperties.setProperty(key, obj);
-      if (andSave && !propsAreReadOnly)
+      if (andSave && !propsAreReadOnly && propertiesFile != null)
       {
         FileOutputStream out = new FileOutputStream(propertiesFile);
         applicationProperties.store(out, "---JalviewX Properties File---");