Blob Blame History Raw
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 74b2781..085c9e3 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -6342,20 +6342,22 @@ merge_selection_region (EvView *view,
 					region = NULL;
 				} else {
 					gint num_rectangles = cairo_region_num_rectangles (region);
-					GdkRectangle r;
+					GdkRectangle r1, r2;
 
 					/* We need to make the damage region a little bigger
 					 * because the edges of the old selection might change
 					 */
-					cairo_region_get_rectangle (region, 0, &r);
-					r.x -= 5;
-					r.width = 5;
-					cairo_region_union_rectangle (region, &r);
-
-					cairo_region_get_rectangle (region, num_rectangles - 1, &r);
-					r.x += r.width;
-					r.width = 5;
-					cairo_region_union_rectangle (region, &r);
+					cairo_region_get_rectangle (region, 0, &r1);
+					cairo_region_get_rectangle (region, num_rectangles - 1, &r2);
+
+					r1.x -= 5;
+					r1.width = 5;
+
+					r2.x += r2.width;
+					r2.width = 5;
+
+					cairo_region_union_rectangle (region, &r1);
+					cairo_region_union_rectangle (region, &r2);
 				}
 			} else if (old_sel->covered_region) {
 				region = cairo_region_copy (old_sel->covered_region);