Dont try setting an image if the view is lost

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-01-24 11:59:31 +01:00
parent 5652dca771
commit 714ed70889

View File

@ -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) {