Error message

Notice: Trying to get property of non-object in main_preprocess_views_view() (line 40 of /home/b14cms.dk/users/sangberg/prod/web/sites/all/modules/site/main/main.module).