Explorar o código

Dont try setting an image if the view is lost

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic %!s(int64=6) %!d(string=hai) anos
pai
achega
714ed70889

+ 2 - 2
app/src/main/java/com/nextcloud/talk/controllers/CallNotificationController.java

@@ -437,7 +437,7 @@ public class CallNotificationController extends BaseController {
                                             (getActivity()).getBitmapPool(), resource, avatarSize, avatarSize));
                                             (getActivity()).getBitmapPool(), resource, avatarSize, avatarSize));
                                 }
                                 }
 
 
-                                if (getResources() != null) {
+                                if (getResources() != null && incomingTextRelativeLayout != null) {
                                     incomingTextRelativeLayout.setBackground(getResources().getDrawable(R.drawable
                                     incomingTextRelativeLayout.setBackground(getResources().getDrawable(R.drawable
                                             .incoming_gradient));
                                             .incoming_gradient));
                                 }
                                 }
@@ -453,7 +453,7 @@ public class CallNotificationController extends BaseController {
                                     script.forEach(output);
                                     script.forEach(output);
                                     output.copyTo(resource);
                                     output.copyTo(resource);
 
 
-                                    if (backgroundImageView != null) {
+                                    if (backgroundImageView != null && backgroundImageView != null) {
                                         backgroundImageView.setImageDrawable(new BitmapDrawable(resource));
                                         backgroundImageView.setImageDrawable(new BitmapDrawable(resource));
                                     }
                                     }
                                 } else if (AvatarStatusCodeHolder.getInstance().getStatusCode() == 201) {
                                 } else if (AvatarStatusCodeHolder.getInstance().getStatusCode() == 201) {