]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/load/FileCacher.java
Version 3, August 2007
[GpsPrune.git] / tim / prune / load / FileCacher.java
index 733754bd83c0d98cdab258020907f89f98017430..ad0f0efb9088855696c898178bee335f25bfadaf 100644 (file)
@@ -96,10 +96,15 @@ public class FileCacher
                {
                        for (int i=0; i<size; i++)
                        {
-                               if (result[i].length() > inMaxWidth)
-                                       result[i] = result[i].trim();
-                               if (result[i].length() > inMaxWidth)
-                                       result[i] = result[i].substring(0, inMaxWidth);
+                               if (result[i] == null)
+                                       result[i] = "";
+                               else
+                               {
+                                       if (result[i].length() > inMaxWidth)
+                                               result[i] = result[i].trim();
+                                       if (result[i].length() > inMaxWidth)
+                                               result[i] = result[i].substring(0, inMaxWidth);
+                               }
                        }
                }
                return result;