From 714ed70889412542b61cce1c97175741904155ef Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Thu, 24 Jan 2019 11:59:31 +0100 Subject: [PATCH] Dont try setting an image if the view is lost Signed-off-by: Mario Danic --- .../talk/controllers/CallNotificationController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java b/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java index 032c01799..be280726a 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java @@ -437,7 +437,7 @@ public class CallNotificationController extends BaseController { (getActivity()).getBitmapPool(), resource, avatarSize, avatarSize)); } - if (getResources() != null) { + if (getResources() != null && incomingTextRelativeLayout != null) { incomingTextRelativeLayout.setBackground(getResources().getDrawable(R.drawable .incoming_gradient)); } @@ -453,7 +453,7 @@ public class CallNotificationController extends BaseController { script.forEach(output); output.copyTo(resource); - if (backgroundImageView != null) { + if (backgroundImageView != null && backgroundImageView != null) { backgroundImageView.setImageDrawable(new BitmapDrawable(resource)); } } else if (AvatarStatusCodeHolder.getInstance().getStatusCode() == 201) {