[openbeos] Re: Tracker bug and screen saver question

  • From: "François Revol" <revol@xxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Wed, 17 Jan 2007 22:51:07 +0100 CET

> On to the screen saver question. My problem is that every screen 
> saver I 
> write that uses OpenGL crashes.. :) I don't know if I'm doing 
> anything 
> wrong or if there is a bug outside of my screen savers. I've attached 
> a 
> small example saver. Can anyone spot any obvious errors? Should be 
> possible to temporarily replace the screen saver "Haiku" with this 
> source file and just make sure it links against libGL.so. All crashes 
> happens when exiting the savers, either by selecting another in 
> preferences or by moving the mouse to exit the test mode.

How about:

void
ScreenSaver::StopSaver()
{
        if (fGLView && fGLView->LockLooper()) {
                BLooper *l = fGLView->Looper();
                fGLView->RemoveSelf();
                l->Unlock();
        }
        delete fGLView;
        fGLView = NULL;
}

ScreenSaver::~ScreenSaver()
{
}


Other related posts: