Fix potential crash when activity is finishing

This commit is contained in:
tom79 2019-08-20 13:11:25 +02:00
parent 290dcbb8a9
commit ebfd2e6416
1 changed files with 3 additions and 0 deletions

View File

@ -1709,6 +1709,9 @@ public class Helper {
* @param headerLayout View - the menu header * @param headerLayout View - the menu header
*/ */
public static void updateHeaderAccountInfo(Activity activity, final Account account, final View headerLayout){ public static void updateHeaderAccountInfo(Activity activity, final Account account, final View headerLayout){
if( activity.isFinishing())
return;
ImageView profilePicture = headerLayout.findViewById(R.id.profilePicture); ImageView profilePicture = headerLayout.findViewById(R.id.profilePicture);
TextView username = headerLayout.findViewById(R.id.username); TextView username = headerLayout.findViewById(R.id.username);
TextView displayedName = headerLayout.findViewById(R.id.displayedName); TextView displayedName = headerLayout.findViewById(R.id.displayedName);