ceacy
29-11-2006 23:04:38
Hi,
I'm using a steeper set to Automatic in my application : as long as it is used, there's no problem.
But when i change my app state (from "PlayState" to "MenuState"), i have to delete it.
So, Stepper::~Stepper calls "setAutomatic(AutoMode_NotAutomatic);" to unregister itself as FrameListener. This should be ok. However, i get this kind of problem : the frame listener will only be deleted at next iteration ... but my program doesn't wait until it's removed : Ogre calls the deleted frame listener, and a segfault happens.
I don't know if there is an elegant way to fix this, but it's rather annoying
I'm using a steeper set to Automatic in my application : as long as it is used, there's no problem.
But when i change my app state (from "PlayState" to "MenuState"), i have to delete it.
So, Stepper::~Stepper calls "setAutomatic(AutoMode_NotAutomatic);" to unregister itself as FrameListener. This should be ok. However, i get this kind of problem : the frame listener will only be deleted at next iteration ... but my program doesn't wait until it's removed : Ogre calls the deleted frame listener, and a segfault happens.
I don't know if there is an elegant way to fix this, but it's rather annoying