mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 07:20:40 +00:00
Merge pull request #594 from LuisAntonRebollo/unit-tests-without-crash
Increased stability Torque3D: unit-tests running without a crash.
This commit is contained in:
commit
feec36731e
18 changed files with 113 additions and 19 deletions
|
|
@ -98,6 +98,9 @@ static S32 QSORT_CALLBACK compareEntries(const void* a,const void* b)
|
|||
//-----------------------------------------------------------------------------
|
||||
bool GuiInspectorDynamicGroup::inspectGroup()
|
||||
{
|
||||
if( !mParent )
|
||||
return false;
|
||||
|
||||
// clear the first responder if it's set
|
||||
mStack->clearFirstResponder();
|
||||
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ void GuiInspectorField::setInspectorProfile()
|
|||
{
|
||||
GuiControlProfile *profile = NULL;
|
||||
|
||||
if( mInspector->getNumInspectObjects() > 1 )
|
||||
if( mInspector && (mInspector->getNumInspectObjects() > 1) )
|
||||
{
|
||||
if( !hasSameValueInAllObjects() )
|
||||
Sim::findObject( "GuiInspectorMultiFieldDifferentProfile", profile );
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ void GuiInspectorGroup::clearFields()
|
|||
bool GuiInspectorGroup::inspectGroup()
|
||||
{
|
||||
// We can't inspect a group without a target!
|
||||
if( !mParent->getNumInspectObjects() )
|
||||
if( !mParent || !mParent->getNumInspectObjects() )
|
||||
return false;
|
||||
|
||||
// to prevent crazy resizing, we'll just freeze our stack for a sec..
|
||||
|
|
|
|||
|
|
@ -50,6 +50,12 @@ GuiInspectorVariableField::~GuiInspectorVariableField()
|
|||
|
||||
bool GuiInspectorVariableField::onAdd()
|
||||
{
|
||||
if( !mInspector )
|
||||
{
|
||||
Con::errorf("GuiInspectorVariableField::onAdd - Fail - No inspector");
|
||||
return false;
|
||||
}
|
||||
|
||||
setInspectorProfile();
|
||||
|
||||
// Hack: skip our immediate parent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue