comparison nodejs/paints.cc @ 771:01b514800fbe

Fix logic error of checking clear flag for paint.
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 29 Aug 2010 19:06:24 +0800
parents be0e02948c1d
children 586e50f82c1f
comparison
equal deleted inserted replaced
770:abd9bbf24545 771:01b514800fbe
33 xnjsmb_paint_recycle(Persistent<Value> obj, void *parameter) { 33 xnjsmb_paint_recycle(Persistent<Value> obj, void *parameter) {
34 Persistent<Object> *paint_hdl = (Persistent<Object> *)parameter; 34 Persistent<Object> *paint_hdl = (Persistent<Object> *)parameter;
35 paint_t *paint; 35 paint_t *paint;
36 Handle<Object> rt; 36 Handle<Object> rt;
37 redraw_man_t *rdman; 37 redraw_man_t *rdman;
38 int r;
38 39
39 paint = (paint_t *)UNWRAP(*paint_hdl); 40 paint = (paint_t *)UNWRAP(*paint_hdl);
40 rt = GET(*paint_hdl, "mbrt")->ToObject(); 41 rt = GET(*paint_hdl, "mbrt")->ToObject();
41 rdman = xnjsmb_rt_rdman(rt); 42 rdman = xnjsmb_rt_rdman(rt);
42 43
43 rdman_paint_free(rdman, paint); 44 r = rdman_paint_free(rdman, paint);
45 ASSERT(r == 0);
44 46
45 paint_hdl->Dispose(); 47 paint_hdl->Dispose();
46 delete paint_hdl; 48 delete paint_hdl;
47 } 49 }
48 50