a member of type XVisualInfo was created with new() operator,
but was released with XFree() call which internally uses free().
XFree() was replaced with matching delete() operator calls.
X11WindowSystem::~X11WindowSystem()
{
+ if (windowVis)
+ {
+ delete windowVis;
+ }
}
XVisualInfo* X11WindowSystem::getDefaultVisual(Display *dpy)
if (!XMatchVisualInfo( dpy, 0, windowVis->depth, TrueColor, windowVis))
{
LOG_ERROR("X11WindowSystem", "Error: Required visual not found\n");
- XFree(windowVis);
+ delete windowVis;
return NULL;
}
}
if (windowVis)
{
- XFree(windowVis);
+ delete windowVis;
}
#ifdef WITH_XTHREADS