g_file_query_info can return NULL. Use g_clear_object to make sure we don't try to unref NULL pointer.