1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-06-30 22:54:23 +00:00

ev-view-presentation: Simplify reset_jobs calls

ev_presentation_delete_job already checks whether the job is NULL,
and finishes with a g_object_unref which warranties that

pview->*_job = NULL

So there's no need to set them afterwards.
This commit is contained in:
Pablo Correa Gómez 2023-03-14 19:56:19 +01:00
parent 200be9b923
commit 6702f26186
No known key found for this signature in database
GPG Key ID: 7A342565FF635F79

View File

@ -410,20 +410,9 @@ ev_view_presentation_delete_job (EvViewPresentation *pview,
static void
ev_view_presentation_reset_jobs (EvViewPresentation *pview)
{
if (pview->curr_job) {
ev_view_presentation_delete_job (pview, pview->curr_job);
pview->curr_job = NULL;
}
if (pview->prev_job) {
ev_view_presentation_delete_job (pview, pview->prev_job);
pview->prev_job = NULL;
}
if (pview->next_job) {
ev_view_presentation_delete_job (pview, pview->next_job);
pview->next_job = NULL;
}
ev_view_presentation_delete_job (pview, pview->curr_job);
ev_view_presentation_delete_job (pview, pview->prev_job);
ev_view_presentation_delete_job (pview, pview->next_job);
}
static void