[evince] [presentation] Fix a crash when starting animation
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [presentation] Fix a crash when starting animation
- Date: Wed, 2 Jun 2010 10:43:05 +0000 (UTC)
commit 9786d5c14d4ce989b499519c7f96f7c2dcad7f0a
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Wed Jun 2 12:40:26 2010 +0200
[presentation] Fix a crash when starting animation
Fixes bug #619948.
libview/ev-view-presentation.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index 311695e..459272c 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -304,16 +304,16 @@ ev_view_presentation_animation_start (EvViewPresentation *pview,
pview->animation = ev_transition_animation_new (effect);
- surface = EV_JOB_RENDER (pview->curr_job)->surface;
+ surface = pview->curr_job ? EV_JOB_RENDER (pview->curr_job)->surface : NULL;
ev_transition_animation_set_origin_surface (pview->animation,
surface != NULL ?
surface : pview->current_surface);
jump = new_page - pview->current_page;
if (jump == -1)
- surface = EV_JOB_RENDER (pview->prev_job)->surface;
+ surface = pview->prev_job ? EV_JOB_RENDER (pview->prev_job)->surface : NULL;
else if (jump == 1)
- surface = EV_JOB_RENDER (pview->next_job)->surface;
+ surface = pview->next_job ? EV_JOB_RENDER (pview->next_job)->surface : NULL;
else
surface = NULL;
if (surface)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]