mirror of
https://github.com/ChronosX88/mta-mono.git
synced 2024-11-22 02:02:23 +00:00
Исправлен баг с неправильным поиском метода. Добавлен обработчик исключений
This commit is contained in:
parent
2b20afcb59
commit
669f475d79
@ -141,14 +141,21 @@ MonoObject* CMonoClass::New( void** args, int argc )
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CMonoMethod* pMethod = this->GetMethod( ".ctor", argc );
|
||||
MonoMethod* pMethod = this->GetMethodFromName( ".ctor", argc );
|
||||
|
||||
if( !pMethod )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
pMethod->Invoke( pObject, args, nullptr );
|
||||
MonoObject* pException = nullptr;
|
||||
|
||||
mono_runtime_invoke( pMethod, pObject, args, &pException );
|
||||
|
||||
if( pException )
|
||||
{
|
||||
this->GetDomain()->HandleException( pException );
|
||||
}
|
||||
|
||||
return pObject;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user