提交 72e189cc 编写于 作者: S Sam Judd

Explicitly verify state is non null in Drawables.

Related to #233.
上级 f7a6d65c
......@@ -29,6 +29,10 @@ public class GlideBitmapDrawable extends GlideDrawable {
}
GlideBitmapDrawable(Resources res, BitmapState state) {
if (state == null) {
throw new NullPointerException("BitmapState must not be null");
}
this.state = state;
final int targetDensity;
if (res != null) {
......
......@@ -75,6 +75,10 @@ public class GifDrawable extends GlideDrawable implements GifFrameManager.FrameC
}
GifDrawable(GifState state) {
if (state == null) {
throw new NullPointerException("GifState must not be null");
}
this.state = state;
this.decoder = new GifDecoder(state.bitmapProvider);
decoder.setData(state.gifHeader, state.data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册