incorrect contacts list update fixed

This commit is contained in:
ingvar1995
2016-12-24 14:20:58 +03:00
parent 2c4301e4f0
commit 9e7e9b9012
2 changed files with 9 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ class BaseContact:
"""
avatar_path = '{}.png'.format(self._tox_id[:TOX_PUBLIC_KEY_SIZE * 2])
os.chdir(ProfileHelper.get_path() + 'avatars/')
if not os.path.isfile(avatar_path): # load default image
if not os.path.isfile(avatar_path) or not os.path.getsize(avatar_path): # load default image
avatar_path = 'avatar.png'
os.chdir(curr_directory() + '/images/')
width = self._widget.avatar_label.width()