From 5f5c0cdbc4f397da622905a7e3fee6093e8555b2 Mon Sep 17 00:00:00 2001 From: Jeffrey Han Date: Thu, 20 Aug 2015 18:54:18 -0500 Subject: [PATCH] Fix program crashing if unable to connect to BeatmapDB. (fixes #111) In this case, load all beatmaps from disk instead of trying to read from the cache. Signed-off-by: Jeffrey Han --- src/itdelatrisu/opsu/beatmap/BeatmapParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/itdelatrisu/opsu/beatmap/BeatmapParser.java b/src/itdelatrisu/opsu/beatmap/BeatmapParser.java index ef403b03..be729980 100644 --- a/src/itdelatrisu/opsu/beatmap/BeatmapParser.java +++ b/src/itdelatrisu/opsu/beatmap/BeatmapParser.java @@ -134,7 +134,7 @@ public class BeatmapParser { // check if beatmap is cached String path = String.format("%s/%s", dir.getName(), file.getName()); - if (map.containsKey(path)) { + if (map != null && map.containsKey(path)) { // check last modified times long lastModified = map.get(path); if (lastModified == file.lastModified()) {