mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 21:40:31 +00:00
Fix NULL pointer deref crashes in WorldEditor::selectObject & WorldEditor::unSelectObject
This commit is contained in:
parent
272e3138a0
commit
d6226a71ca
1 changed files with 2 additions and 2 deletions
|
|
@ -2810,7 +2810,7 @@ void WorldEditor::clearSelection()
|
|||
|
||||
void WorldEditor::selectObject( SimObject *obj )
|
||||
{
|
||||
if ( mSelectionLocked || !mSelected )
|
||||
if ( mSelectionLocked || !mSelected || !obj )
|
||||
return;
|
||||
|
||||
// Don't check isSelectionEnabled of SceneObjects here as we
|
||||
|
|
@ -2833,7 +2833,7 @@ void WorldEditor::selectObject( const char* obj )
|
|||
|
||||
void WorldEditor::unselectObject( SimObject *obj )
|
||||
{
|
||||
if ( mSelectionLocked || !mSelected )
|
||||
if ( mSelectionLocked || !mSelected || !obj )
|
||||
return;
|
||||
|
||||
if ( !objClassIgnored( obj ) && mSelected->objInSet( obj ) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue