X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=library%2FLocalLibrary.java;h=aec89721753252783a6b3f9c3468e4afd4b7f9d1;hb=598196006967b6ea4da21e7236fa21f51a9af12b;hp=3cf5a25bc232baddd6ed34df9faabbaa3d82281f;hpb=dc919036d4177c667f46f82a132f9287da4fa205;p=nikiroo-utils.git diff --git a/library/LocalLibrary.java b/library/LocalLibrary.java index 3cf5a25..aec8972 100644 --- a/library/LocalLibrary.java +++ b/library/LocalLibrary.java @@ -637,10 +637,13 @@ public class LocalLibrary extends BasicLibrary { } Map stories = this.stories; - synchronized (lock) { - if (stories == null) { - stories = getStoriesDo(pg); - this.stories = stories; + if (stories == null) { + stories = getStoriesDo(pg); + synchronized (lock) { + if (this.stories == null) + this.stories = stories; + else + stories = this.stories; } }