Show
Ignore:
Timestamp:
04/06/07 21:38:22 (8 years ago)
Author:
robert
Message:

Added extra check to prevent calling frame() when the window has been closed.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgkeyboardmouse/osgkeyboardmouse.cpp

    r6034 r6462  
    392392        gw->checkEvents(); 
    393393         
    394         viewer.frame(); 
    395  
    396         // Swap Buffers 
    397         gw->swapBuffers(); 
     394        if (gw->isRealized() && !exitHandler->done()) 
     395        {       
     396            viewer.frame(); 
     397 
     398            // Swap Buffers 
     399            gw->swapBuffers(); 
     400        } 
    398401    } 
    399402