Skip to content

Commit

Permalink
Prevent NullPointerException by not setting the static instance until…
Browse files Browse the repository at this point in the history
… registration is complete (#2061)
  • Loading branch information
Codeintheory authored and sjudd committed Jul 6, 2017
1 parent 0349ac3 commit 211c4db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/src/main/java/com/bumptech/glide/Glide.java
Expand Up @@ -167,10 +167,11 @@ public static Glide get(Context context) {
for (GlideModule module : modules) {
module.applyOptions(applicationContext, builder);
}
glide = builder.createGlide();
Glide glide = builder.createGlide();
for (GlideModule module : modules) {
module.registerComponents(applicationContext, glide);
}
Glide.glide = glide;
}
}
}
Expand Down

0 comments on commit 211c4db

Please sign in to comment.