From 56b6b7de37e416ad87a8b2766ed0df4f13a67778 Mon Sep 17 00:00:00 2001 From: vg Date: Mon, 2 Jan 2023 20:50:37 +0100 Subject: git-sync on dita --- pygame/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pygame') diff --git a/pygame/__init__.py b/pygame/__init__.py index c516008..4bbf096 100755 --- a/pygame/__init__.py +++ b/pygame/__init__.py @@ -200,7 +200,10 @@ class ProfileData(ObservedSubject): return self.profiledb.get_profiles()[self.current_profile_index]['name'] def get_current_profile_avatar(self): - return self.profiledb.get_profiles()[self.current_profile_index].get('avatar', None) + avatar = self.profiledb.get_profiles()[self.current_profile_index].get('avatar', None) + if avatar is None: + avatar = config.get_data_d() / 'asset/default_avatar.jpeg' + return avatar def get_current_display(self): return self.profiledb.get_profiles()[self.current_profile_index]['display'] -- cgit v1.2.3