altosuilib: Fix crash when initializing site map cache
authorKeith Packard <keithp@keithp.com>
Sat, 7 Jun 2014 18:50:42 +0000 (11:50 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 7 Jun 2014 19:34:15 +0000 (12:34 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
altosuilib/AltosSiteMapCache.java

index 3e08e1b3c91a992cde955b981286a1aaccaf45bb..51778ce1301d404ed1c70b444c91afab9603e032 100644 (file)
@@ -158,7 +158,7 @@ public class AltosSiteMapCache {
                        for (int i = 0; i < cache_size; i++) {
                                if (i < new_size)
                                        new_images[i] = images[i];
-                               else
+                               else if (images[i] != null)
                                        images[i].flush();
                        }
                        images = new_images;