changeset 836:f3ce3598612f

Avoid to add a coord to dirty_pcache_area_coords twice or more
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 17 Sep 2010 12:21:36 +0800
parents 51da337879bd
children 0b66b585b364
files src/redraw_man.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/redraw_man.c	Fri Sep 17 12:21:35 2010 +0800
+++ b/src/redraw_man.c	Fri Sep 17 12:21:36 2010 +0800
@@ -474,8 +474,10 @@
 }
 
 static int add_dirty_pcache_area_coord(redraw_man_t *rdman, coord_t *coord) {
-    coord_set_flags(coord, COF_DIRTY_PCACHE_AREA);
-    ADD_DATA(coords, dirty_pcache_area_coords, coord);
+    if(!coord_get_flags(coord, COF_DIRTY_PCACHE_AREA)) {
+	coord_set_flags(coord, COF_DIRTY_PCACHE_AREA);
+	ADD_DATA(coords, dirty_pcache_area_coords, coord);
+    }
     return OK;
 }