Increased stability Torqu3D: unit-tests running without a crash. See the console.log after ran unitTest_runTests( "", true ). @signmotion

This commit is contained in:
LuisAntonRebollo 2014-05-25 16:50:19 +02:00
parent 29d7fe310d
commit 18ba0646c0
18 changed files with 113 additions and 19 deletions

View file

@ -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();

View file

@ -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 );

View file

@ -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..

View file

@ -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