mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-09 12:08:12 +03:00
Use CurrentScriptThread() when getting the current script class
So if the current thread is NULL, it will properly throw an exception
This commit is contained in:
parent
d3212c55a0
commit
2ce5e498ab
1 changed files with 1 additions and 2 deletions
|
@ -835,7 +835,7 @@ void ScriptMaster::RemoveTiming(ScriptThread *thread)
|
|||
|
||||
ScriptClass *ScriptMaster::CurrentScriptClass(void)
|
||||
{
|
||||
return CurrentThread()->GetScriptClass();
|
||||
return CurrentScriptThread()->GetScriptClass();
|
||||
}
|
||||
|
||||
void ScriptMaster::CloseGameScript(void)
|
||||
|
@ -1099,7 +1099,6 @@ ScriptThread *ScriptMaster::CurrentThread(void)
|
|||
|
||||
ScriptThread *ScriptMaster::CurrentScriptThread(void)
|
||||
{
|
||||
assert(m_CurrentThread);
|
||||
if (!m_CurrentThread) {
|
||||
ScriptError("current thread is NULL");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue