Merge /u/r-harrison/flightgear/ branch next into next
http://sourceforge.net/p/flightgear/flightgear/merge-requests/21/
This commit is contained in:
commit
6954360dfa
3 changed files with 12 additions and 7 deletions
|
@ -127,8 +127,10 @@ class ReplaceStaticTextureVisitor:
|
|||
simgear::EffectGeode* eg = dynamic_cast<simgear::EffectGeode*>(&node);
|
||||
if( !eg )
|
||||
return;
|
||||
|
||||
osg::StateSet* ss = eg->getEffect()->getDefaultStateSet();
|
||||
simgear::Effect* eff = eg->getEffect();
|
||||
if (!eff)
|
||||
return;
|
||||
osg::StateSet* ss = eff->getDefaultStateSet();
|
||||
if( !ss )
|
||||
return;
|
||||
|
||||
|
|
|
@ -1171,7 +1171,9 @@ bool FGNasalSys::createModule(const char* moduleName, const char* fileName,
|
|||
naRef locals;
|
||||
naRef modname = naNewString(ctx);
|
||||
naStr_fromdata(modname, (char*)moduleName, strlen(moduleName));
|
||||
if(!naHash_get(_globals, modname, &locals))
|
||||
if (naIsNil(_globals))
|
||||
return false;
|
||||
if (!naHash_get(_globals, modname, &locals))
|
||||
locals = naNewHash(ctx);
|
||||
|
||||
_cmdArg = (SGPropertyNode*)cmdarg;
|
||||
|
|
|
@ -190,18 +190,19 @@ public:
|
|||
// that internally, so we simply pass the message on.
|
||||
virtual void notify(osg::NotifySeverity severity, const char *message)
|
||||
{
|
||||
SG_LOG(SG_GL, translateSeverity(severity), message);
|
||||
|
||||
// Detect whether a osg::Reference derived object is deleted with a non-zero
|
||||
// reference count. In this case trigger a segfault to get a stack trace.
|
||||
if( strstr(message, "the final reference count was") )
|
||||
{
|
||||
|
||||
// as this is going to segfault ignore the translation of severity and always output the message.
|
||||
SG_LOG(SG_GL, SG_ALERT, message);
|
||||
int* trigger_segfault = 0;
|
||||
*trigger_segfault = 0;
|
||||
return;
|
||||
}
|
||||
SG_LOG(SG_GL, translateSeverity(severity), message);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
sgDebugPriority translateSeverity(osg::NotifySeverity severity)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue