File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
photoview/src/main/java/com/github/chrisbanes/photoview Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -109,19 +109,25 @@ public void setScaleType(ScaleType scaleType) {
109109 public void setImageDrawable (Drawable drawable ) {
110110 super .setImageDrawable (drawable );
111111 // setImageBitmap calls through to this method
112- attacher .update ();
112+ if (attacher != null ) {
113+ attacher .update ();
114+ }
113115 }
114116
115117 @ Override
116118 public void setImageResource (int resId ) {
117119 super .setImageResource (resId );
118- attacher .update ();
120+ if (attacher != null ) {
121+ attacher .update ();
122+ }
119123 }
120124
121125 @ Override
122126 public void setImageURI (Uri uri ) {
123127 super .setImageURI (uri );
124- attacher .update ();
128+ if (attacher != null ) {
129+ attacher .update ();
130+ }
125131 }
126132
127133 @ Override
You can’t perform that action at this time.
0 commit comments