Skip to content

Commit

Permalink
Fixed double initialization, Closing Baseflow#250
Browse files Browse the repository at this point in the history
  • Loading branch information
smarek committed Apr 2, 2015
1 parent bc6e8e9 commit 8e64196
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/src/main/java/uk/co/senab/photoview/PhotoView.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public PhotoView(Context context, AttributeSet attr, int defStyle) {
}

protected void init() {
mAttacher = new PhotoViewAttacher(this);
if (null == mAttacher || null == mAttacher.getImageView()) {
mAttacher = new PhotoViewAttacher(this);
}

if (null != mPendingScaleType) {
setScaleType(mPendingScaleType);
Expand Down

0 comments on commit 8e64196

Please sign in to comment.