Impossible to access an attribute ("avatar") on a null variable

hi i am facing this following error:

.Impossible to access an attribute (“avatar”) on a null variable

  • Exception
  • Logs 1
  • Stack Trace

Twig\Error\RuntimeError

in \ vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/views/AdminUser/_avatarImage.html.twig (line 1)

  1. {% if app.user.avatar is not empty and app.user.avatar.path is not empty %}
  2. {% set path = app.user.avatar.path|imagine_filter('sylius_admin_admin_user_avatar_thumbnail') %}
  3. {% else %}
  4. {% set path = '//placehold.it/50x50' %}
  5. {% endif %}

when i want to add a new standard product

please can ou help me solve this problème