mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #4041 from nextcloud/ezaquarii/fix-weak-ref-dereference-npe-in-thumbnails-cache-manager
Fix NPE on weakref in ThumbnailsCacheManger
This commit is contained in:
commit
5c686ef313
1 changed files with 5 additions and 4 deletions
|
@ -841,10 +841,11 @@ public final class ThumbnailsCacheManager {
|
|||
protected void onPostExecute(Drawable drawable) {
|
||||
if (drawable != null) {
|
||||
AvatarGenerationListener listener = mAvatarGenerationListener.get();
|
||||
AvatarGenerationTask avatarWorkerTask = getAvatarWorkerTask(mCallContext);
|
||||
|
||||
if (this == avatarWorkerTask && listener.shouldCallGeneratedCallback(mUserId, mCallContext)) {
|
||||
listener.avatarGenerated(drawable, mCallContext);
|
||||
if (listener != null) {
|
||||
AvatarGenerationTask avatarWorkerTask = getAvatarWorkerTask(mCallContext);
|
||||
if (this == avatarWorkerTask && listener.shouldCallGeneratedCallback(mUserId, mCallContext)) {
|
||||
listener.avatarGenerated(drawable, mCallContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue