Skip to content

Commit

Permalink
Merge Validate app domain before removing ref (pr-2861)
Browse files Browse the repository at this point in the history
7f1be62 - fix(scripting/mono-v2): validate app domain before removing ref
  • Loading branch information
prikolium-cfx committed Oct 31, 2024
2 parents 24c6b8f + 7f1be62 commit bcfe47f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ result_t MonoScriptRuntime::RemoveRef(int32_t refIndex)
{
fx::PushEnvironment env(this);
MonoComponentHost::EnsureThreadAttached();

if (m_appDomain == nullptr)
{
return FX_E_INVALIDARG;
}

MonoDomainScope scope(m_appDomain);

MonoException* exc = nullptr;
Expand Down

0 comments on commit bcfe47f

Please sign in to comment.