Check if viewing a Views page
Following Jeremy French reply, I must say that you can do it like this :

if(function_exists('views_get_page_view') &amp;&amp; views_get_page_view()){...YOUR CODE HERE...}


Taken from here: 


  views_get_page_view() finds out what, if any, page view is currently
  in use. If it returns NULL, then the current page is not a views'
  page.