Skip to content

Commit

Permalink
Fix crash for ScriptingObject.ToString if class is null
Browse files Browse the repository at this point in the history
  • Loading branch information
mafiesto4 committed Dec 28, 2020
1 parent 4c372c0 commit 140fae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Engine/Scripting/ScriptingObject.cpp
Expand Up @@ -235,7 +235,7 @@ void ScriptingObject::OnDeleteObject()

String ScriptingObject::ToString() const
{
return GetClass()->ToString();
return _type ? _type.GetType().ManagedClass->ToString() : String::Empty;
}

ManagedScriptingObject::ManagedScriptingObject(const SpawnParams& params)
Expand Down

0 comments on commit 140fae3

Please sign in to comment.