commit a35a36115fd3bda45045ae0c39eee44ac1a63a13 parent 59459b59dc5ae8e4a8f7a5f1a1022649d00fdf84 Author: Jacki <jacki@thejackimonster.de> Date: Fri, 26 Apr 2024 03:07:28 +0200 Decrease chance of failure updating account avatars Signed-off-by: Jacki <jacki@thejackimonster.de> Diffstat:
| M | src/account.c | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/account.c b/src/account.c @@ -176,7 +176,12 @@ _task_update_avatars(gpointer data) { g_assert(data); - MESSENGER_AccountInfo *info = (MESSENGER_AccountInfo*) data; + struct GNUNET_CHAT_Account *account = (struct GNUNET_CHAT_Account*) data; + + MESSENGER_AccountInfo *info = GNUNET_CHAT_account_get_user_pointer(account); + + if (!info) + return FALSE; info->task = 0; @@ -232,7 +237,7 @@ skip_comparison: info->icon = g_file_icon_new(file_object); if (!(info->task)) - info->task = util_idle_add(G_SOURCE_FUNC(_task_update_avatars), info); + info->task = util_idle_add(G_SOURCE_FUNC(_task_update_avatars), account); } static enum GNUNET_GenericReturnValue