I'm glad it solved your problem. Please mark the thread as solved.
And here's a very simple explanation:
// Select maximum value - 1 or the current page
$page = max(1, get_query_var('page'));
// Create a new WP_Query and pass the current page value as an argument