Fatal error: Call to a member function is_main_query() on a non-object in

When I activate the Events + plugin I receive this error when I visit the website: Fatal error: Call to a member function is_main_query() on a non-object in /home/howiaxge/public_html/wp-content/plugins/events-and-bookings/lib/default_filters.php on line 122. How can I fix this issue?