mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-28 16:26:50 +00:00
# Fix possible GC crash bugs
This was SVN commit r7546.
This commit is contained in:
@@ -80,13 +80,10 @@ static jsval ConvertCParamNode(JSContext* cx, CParamNode const& val)
|
||||
|
||||
// Got child nodes - convert this node into a hash-table-style object:
|
||||
|
||||
ScriptInterface::LocalRootScope scope(cx);
|
||||
if (!scope.OK())
|
||||
return JSVAL_VOID; // TODO: report error
|
||||
|
||||
JSObject* obj = JS_NewObject(cx, NULL, NULL, NULL);
|
||||
if (!obj)
|
||||
return JSVAL_VOID; // TODO: report error
|
||||
CScriptValRooted objRoot(cx, OBJECT_TO_JSVAL(obj));
|
||||
|
||||
for (std::map<std::string, CParamNode>::const_iterator it = children.begin(); it != children.end(); ++it)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user