# HG changeset patch # User wycc # Date 1301970210 -28800 # Node ID 88c8c874f4b8ba445b3da3f666029f81bf4f6587 # Parent 05e8d3ffa703204cccf30ddb6b2ffe280477c1ec Check if the js object has been deleted. This prevent the issue that a coord is removed twice. diff -r 05e8d3ffa703 -r 88c8c874f4b8 nodejs/coord.cc --- a/nodejs/coord.cc Mon Apr 04 11:59:19 2011 +0800 +++ b/nodejs/coord.cc Tue Apr 05 10:23:30 2011 +0800 @@ -81,6 +81,7 @@ FOR_COORDS_PREORDER(coord, child) { child_hdl = (Persistent *)mb_prop_get(&child->obj.props, PROP_JSOBJ); + if (child_hdl == NULL) continue; SET(*child_hdl, "valid", _false); WRAP(*child_hdl, NULL); child_hdl->Dispose(); @@ -90,6 +91,7 @@ FOR_COORD_SHAPES(child, mem) { mem_hdl = (Persistent *)mb_prop_get(&mem->obj.props, PROP_JSOBJ); + if (mem_hdl == NULL) continue; SET(*mem_hdl, "valid", _false); WRAP(*mem_hdl, NULL); mem_hdl->Dispose();