diff options
author | Carlos 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) |
commit | c8966c0d0cc708f6828b0cb1b379e6813b72b1c3 (patch) | |
tree | d773aff0da638db231740f0f3d91a03d864ad106 | |
parent | f7d424fa4abeb013d8f38ad7a4b4948d5c1e5a06 (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
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | shell/ev-jobs.c | 5 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,10 @@ +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. + 2008-04-02 Carlos Garcia Campos <carlosgc@gnome.org> * shell/ev-window.c: (ev_window_cmd_continuous), 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; |