Test if selectedprofile is not none
Merge branch 'hotfix/piwikprofiles'