Small Change in Debugger

TheN00B

03-10-2007 05:18:46

Not sure if anyone has noticed this before, but I stumbled upon it after implementing physical components in my object system. If you attempt to de-init the OgreNewt Debugger object and have no bodies created, then you will experience an unhandled exception on this line:


m_debugnode->detachAllObjects();


To correct this, I placed the following lines in the debugger de-init method


Ogre::Node::ChildNodeIterator dIter = m_debugnode->getChildIterator();
if(dIter.hasMoreElements())
m_debugnode->detachAllObjects();


Couldn't think of a better way to do this, nor could I think of a work around without changing the OgreNewt code.

walaber

04-10-2007 18:43:34

I don't think Ogre throws an exception on that code, unless something has changed recently... otherwise all of my demos would crash on exit if you never used the debug viewer...

can anyone else confirm this is happening?

yahoobbuffet

18-10-2007 12:24:24

It is happening on ubuntu linux i386 with Ogre 1.4.5.

dudeabot

28-12-2007 17:38:34

happened to me also

im running windows xp sp2