Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-jobs.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-04-06 09:30:06 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2008-04-06 09:30:06 (GMT)
commitc8966c0d0cc708f6828b0cb1b379e6813b72b1c3 (patch)
treed773aff0da638db231740f0f3d91a03d864ad106 /shell/ev-jobs.c
parentf7d424fa4abeb013d8f38ad7a4b4948d5c1e5a06 (diff)
Fix a crash when printing a range that doesn't specify the start or end
2008-04-06 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-jobs.c: (ev_job_print_get_page_list): Fix a crash when printing a range that doesn't specify the start or end page. Fixes bug #524288. svn path=/trunk/; revision=2989
Diffstat (limited to 'shell/ev-jobs.c')
-rw-r--r--shell/ev-jobs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/ev-jobs.c b/shell/ev-jobs.c
index d38ef66..f6328af 100644
--- a/shell/ev-jobs.c
+++ b/shell/ev-jobs.c
@@ -819,6 +819,11 @@ ev_job_print_get_page_list (EvJobPrint *job,
gint rsize;
gint start, end;
+ if (job->ranges[i].start == -1)
+ job->ranges[i].start = 0;
+ if (job->ranges[i].end == -1)
+ job->ranges[i].end = max_page;
+
if (job->ranges[i].start > max_page)
continue;