Fix potential crash when activity is finishing
This commit is contained in:
parent
290dcbb8a9
commit
ebfd2e6416
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue