Game Development Community

Double Deleting

by Torque3a · in Torque Game Builder · 09/19/2006 (10:27 am) · 2 replies

I found that deleting an object twice crashes TGB.

%anExample = new t2dSceneObject();

%anExample.delete();
%anExample.delete();

It would be nice to have the delete function ignore objects that don't exist. Thanks.

#1
09/19/2006 (10:31 am)
I'm sort of surprised it crashed, but typically one would do this...
if ( isObject( %anExample ) )
   %anExample.delete();
Still... i agree it shouldn't crash out.
#2
09/19/2006 (10:46 am)
My mistake. That wasn't it. Sorry.

I restarted TGB and the bug disappeared. That must have been it.

*This post can be deleted.*