]> www.fi.muni.cz Git - evince.git/commitdiff
Fix a crash when printing a range that doesn't specify the start or end
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 6 Apr 2008 09:30:06 +0000 (09:30 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 6 Apr 2008 09:30:06 +0000 (09:30 +0000)
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

ChangeLog
shell/ev-jobs.c

index a6de9a8a42ce4218f2d0dfb8059647196ce1f6f7..cbe2adcbf84d99dba3877e5b4cc15d27c966f311 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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),
index d38ef663c6678b7a957e967e025df959adea73d6..f6328af64565edae5125b9f84a24ff33ebc3c248 100644 (file)
@@ -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;