# HG changeset patch # User Thinker K.F. Li # Date 1283079984 -28800 # Node ID 01b514800fbe4e4114abb23a58c6b55905519713 # Parent abd9bbf24545b38f452447e4043a9afc8c9d3550 Fix logic error of checking clear flag for paint. diff -r abd9bbf24545 -r 01b514800fbe nodejs/paints.cc --- a/nodejs/paints.cc Sun Aug 29 18:48:20 2010 +0800 +++ b/nodejs/paints.cc Sun Aug 29 19:06:24 2010 +0800 @@ -35,12 +35,14 @@ paint_t *paint; Handle rt; redraw_man_t *rdman; + int r; paint = (paint_t *)UNWRAP(*paint_hdl); rt = GET(*paint_hdl, "mbrt")->ToObject(); rdman = xnjsmb_rt_rdman(rt); - rdman_paint_free(rdman, paint); + r = rdman_paint_free(rdman, paint); + ASSERT(r == 0); paint_hdl->Dispose(); delete paint_hdl; diff -r abd9bbf24545 -r 01b514800fbe src/redraw_man.c --- a/src/redraw_man.c Sun Aug 29 18:48:20 2010 +0800 +++ b/src/redraw_man.c Sun Aug 29 19:06:24 2010 +0800 @@ -889,7 +889,7 @@ shape_t *shape; if(rdman_is_dirty(rdman)) { - if(!(paint->flags & PNTF_FREE)) + if(paint->flags & PNTF_FREE) return ERR; add_free_obj(rdman, paint, (free_func_t)rdman_paint_free); paint->flags |= PNTF_FREE;