1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 10:49:24 +02:00

fixed NPE

This commit is contained in:
Nikolay Pultsin 2011-03-20 05:39:46 +00:00
parent 2a08b9fd31
commit 45b4890d64

View file

@ -496,6 +496,9 @@ public final class Library {
private static final WeakReference<ZLImage> NULL_IMAGE = new WeakReference<ZLImage>(null);
public static ZLImage getCover(ZLFile file) {
if (file == null) {
return null;
}
synchronized(ourCoverMap) {
final String path = file.getPath();
final WeakReference<ZLImage> ref = ourCoverMap.get(path);