Skip to content

Commit 05f0806

Browse files
authored
Fix NPE in PAGImageView.flush() by moving bitmapCache.put() inside the bitmapLock synchronized block. (#3429)
1 parent 25d735f commit 05f0806

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

android/libpag/src/main/java/org/libpag/PAGImageView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,9 +679,9 @@ private boolean handleFrame(final int frame) {
679679
flushBitmap.prepareToDraw();
680680
}
681681
renderBitmap = flushBitmap;
682-
}
683-
if (_cacheAllFramesInMemory && renderBitmap != null) {
684-
bitmapCache.put(frame, renderBitmap);
682+
if (_cacheAllFramesInMemory && flushBitmap != null) {
683+
bitmapCache.put(frame, flushBitmap);
684+
}
685685
}
686686
return true;
687687
}

0 commit comments

Comments
 (0)