summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_x11.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-02-03 10:47:16 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-02-03 10:47:16 (GMT)
commitfda461ddb2ae740b50544d1fd8309d51418912db (patch)
treed58cd7af2f74a3cef032b81668baef3ef06c75ec /src/gui/kernel/qwidget_x11.cpp
parent6e18291266ed33c27c35f069f6915c353d96ee8c (diff)
parent4de2ce7717ba52d3056f10e0a9fbb44eba4091bc (diff)
downloadQt-fda461ddb2ae740b50544d1fd8309d51418912db.zip
Qt-fda461ddb2ae740b50544d1fd8309d51418912db.tar.gz
Qt-fda461ddb2ae740b50544d1fd8309d51418912db.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
Diffstat (limited to 'src/gui/kernel/qwidget_x11.cpp')
-rw-r--r--src/gui/kernel/qwidget_x11.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 1723f64..1a5417d 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -444,6 +444,7 @@ static QVector<Atom> getNetWmState(QWidget *w)
&& actualType == XA_ATOM && actualFormat == 32) {
returnValue.resize(bytesLeft / 4);
XFree((char*) propertyData);
+ propertyData = 0;
// fetch all data
if (XGetWindowProperty(X11->display, w->internalWinId(), ATOM(_NET_WM_STATE), 0,
@@ -458,7 +459,8 @@ static QVector<Atom> getNetWmState(QWidget *w)
if (!returnValue.isEmpty()) {
memcpy(returnValue.data(), propertyData, returnValue.size() * sizeof(Atom));
}
- XFree((char*) propertyData);
+ if (propertyData)
+ XFree((char*) propertyData);
}
return returnValue;