mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-11 00:16:56 +00:00
Improve the warning message for FromJSValue<CColor> when trying to convert a non-object to CColor.
Reviewed by: wraitii Differential Revision: https://code.wildfiregames.com/D2778 This was SVN commit r23727.
This commit is contained in:
@@ -93,7 +93,7 @@ template<> bool ScriptInterface::FromJSVal<CColor>(JSContext* cx, JS::HandleValu
|
||||
JSAutoRequest rq(cx);
|
||||
|
||||
if (!v.isObject())
|
||||
FAIL("JS::HandleValue not an object");
|
||||
FAIL("CColor has to be an object");
|
||||
|
||||
JS::RootedObject obj(cx, &v.toObject());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user