Notice: Trying to get property of non-object in

If there are no search results, then it is somewhat expected that the $post variable is empty and there are no properties in it to be used in the if statements.

You can prevent the error by adding an if statement to make sure $post is what it is supposed to be before the line 3392.

if ( ! is_object($post) || ! is_a($post, 'WP_Post') ) ) {
return;
}

Or the lazy way
if ( empty( $post->ID ) ) {
return;
}

You can always use var_dump to check / debug your variables to make sure they contain the stuff you need.