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:
parent
200be9b923
commit
6702f26186
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user