Added free of _visualInfo if it's already been allocated

This commit is contained in:
Robert Osfield
2010-04-30 10:52:24 +00:00
parent 087559f7a0
commit afce262601

View File

@@ -282,6 +282,16 @@ Display* GraphicsWindowX11::getDisplayToUse() const
bool GraphicsWindowX11::createVisualInfo()
{
if (_visualInfo)
{
#ifdef OSG_USE_EGL
delete _visualInfo;
#else
XFree(_visualInfo);
#endif
_visualInfo = 0;
}
if( _window != 0 )
{
XWindowAttributes watt;