提交 211c4dbd 编写于 作者: C CodeInTheory 提交者: Sam

Prevent NullPointerException by not setting the static instance until...

Prevent NullPointerException by not setting the static instance until registration is complete (#2061)
上级 0349ac3a
...@@ -167,10 +167,11 @@ public class Glide { ...@@ -167,10 +167,11 @@ public class Glide {
for (GlideModule module : modules) { for (GlideModule module : modules) {
module.applyOptions(applicationContext, builder); module.applyOptions(applicationContext, builder);
} }
glide = builder.createGlide(); Glide glide = builder.createGlide();
for (GlideModule module : modules) { for (GlideModule module : modules) {
module.registerComponents(applicationContext, glide); module.registerComponents(applicationContext, glide);
} }
Glide.glide = glide;
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册