Commit 78e87b5c authored by Jörg Ehrichs's avatar Jörg Ehrichs
Browse files

only free event data if I own the resource if a different resource called...

only free event data if I own the resource if a different resource called XGetEventData the data will not be set free again here
parent b29e3fc7
......@@ -63,7 +63,8 @@ bool XDeviceEventNotifier::x11Event(XEvent * event)
if (cookie->type == GenericEvent && cookie->evtype == XI_HierarchyChanged)
{
XGetEventData(QX11Info::display(), cookie);
bool ownEventData = false;
ownEventData = XGetEventData(QX11Info::display(), cookie);
if(cookie->data)
{
......@@ -84,8 +85,11 @@ bool XDeviceEventNotifier::x11Event(XEvent * event)
}
}
}
XFreeEventData(QX11Info::display(), cookie);
// only free event data if I own the resource if a different resource called XGetEventData the data will not be set free again here
if(ownEventData) {
XFreeEventData(QX11Info::display(), cookie);
}
}
else {
kDebug() << "Error couldn't retrieve XGetEventData";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment