Fix #19897: WM_OT_redraw_timer memory leak using Draw Window.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 14 Dec 2009 20:37:05 +0000 (20:37 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 14 Dec 2009 20:37:05 +0000 (20:37 +0000)
source/blender/windowmanager/intern/wm_operators.c

index d1e004a0a2010d958abef697624a82e0c67b25e6..99e34e129d043f83c61841256a2ea7be8166dc2a 100644 (file)
@@ -2550,8 +2550,10 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
                                CTX_wm_area_set(C, sa);
 
                                for(ar_iter= sa->regionbase.first; ar_iter; ar_iter= ar_iter->next) {
-                                       CTX_wm_region_set(C, ar_iter);
-                                       ED_region_do_draw(C, ar_iter);
+                                       if(ar_iter->swinid) {
+                                               CTX_wm_region_set(C, ar_iter);
+                                               ED_region_do_draw(C, ar_iter);
+                                       }
                                }
                        }