mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Merge pull request #456 from smally/tsnaming_heapcorruption
Heap corruption caused by incorrect Torque Script naming
This commit is contained in:
commit
e1830fdf2c
1 changed files with 9 additions and 0 deletions
|
|
@ -650,6 +650,15 @@ breakContinue:
|
||||||
// IF we aren't looking at a local/internal object, then check if
|
// IF we aren't looking at a local/internal object, then check if
|
||||||
// this object already exists in the global space
|
// this object already exists in the global space
|
||||||
|
|
||||||
|
AbstractClassRep* rep = AbstractClassRep::findClassRep( objectName );
|
||||||
|
if (rep != NULL) {
|
||||||
|
Con::errorf(ConsoleLogEntry::General, "%s: Cannot name object [%s] the same name as a script class.",
|
||||||
|
getFileLine(ip), objectName);
|
||||||
|
ip = failJump;
|
||||||
|
STR.popFrame();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
SimObject *obj = Sim::findObject( objectName );
|
SimObject *obj = Sim::findObject( objectName );
|
||||||
if (obj /*&& !obj->isLocalName()*/)
|
if (obj /*&& !obj->isLocalName()*/)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue