We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9d8611 commit b22b363Copy full SHA for b22b363
library/src/uk/co/senab/photoview/PhotoViewAttacher.java
@@ -176,8 +176,8 @@ public final boolean canZoom() {
176
*/
177
@SuppressWarnings("deprecation")
178
public final void cleanup() {
179
- if (null != mViewTreeObserver && mViewTreeObserver.isAlive()) {
180
- mViewTreeObserver.removeGlobalOnLayoutListener(this);
+ if (null != mImageView) {
+ mImageView.get().getViewTreeObserver().removeGlobalOnLayoutListener(this);
181
}
182
mViewTreeObserver = null;
183
0 commit comments