mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 03:06:29 +00:00
Fix missing JSAutoRequest before JS_ReportError in various commits.
Differential Revision: https://code.wildfiregames.com/D2256 Tested on: clang 8.0.1, Jenkins This was SVN commit r22949.
This commit is contained in:
@@ -101,7 +101,9 @@ bool JSI_Game::IsPaused(ScriptInterface::CxPrivate* pCxPrivate)
|
||||
{
|
||||
if (!g_Game)
|
||||
{
|
||||
JS_ReportError(pCxPrivate->pScriptInterface->GetContext(), "Game is not started");
|
||||
JSContext* cx = pCxPrivate->pScriptInterface->GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
JS_ReportError(cx, "Game is not started");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -112,7 +114,9 @@ void JSI_Game::SetPaused(ScriptInterface::CxPrivate* pCxPrivate, bool pause, boo
|
||||
{
|
||||
if (!g_Game)
|
||||
{
|
||||
JS_ReportError(pCxPrivate->pScriptInterface->GetContext(), "Game is not started");
|
||||
JSContext* cx = pCxPrivate->pScriptInterface->GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
JS_ReportError(cx, "Game is not started");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user