diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-11 10:07:26 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-11 10:07:26 (GMT) |
commit | 68cf12a907c4fbc918019dad2c2a845466d15a30 (patch) | |
tree | 0adafc6d8ec233683579a66097b38116722f9f4b /src/gui/kernel | |
parent | dadb7b7ad36c43757d96b540b40cc3d81dca69d2 (diff) | |
parent | c39436c722e778460366995877d66a8935d2d636 (diff) | |
download | Qt-68cf12a907c4fbc918019dad2c2a845466d15a30.zip Qt-68cf12a907c4fbc918019dad2c2a845466d15a30.tar.gz Qt-68cf12a907c4fbc918019dad2c2a845466d15a30.tar.bz2 |
Merge branch '4.5'
Conflicts:
configure
tests/auto/moc/tst_moc.cpp
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qdnd_x11.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp index 7b445ea..765e503 100644 --- a/src/gui/kernel/qdnd_x11.cpp +++ b/src/gui/kernel/qdnd_x11.cpp @@ -811,15 +811,16 @@ void QX11Data::xdndHandleEnter(QWidget *, const XEvent * xe, bool /*passive*/) Atom type = XNone; int f; unsigned long n, a; - unsigned char *retval; + unsigned char *retval = 0; XGetWindowProperty(X11->display, qt_xdnd_dragsource_xid, ATOM(XdndTypelist), 0, qt_xdnd_max_type, False, XA_ATOM, &type, &f,&n,&a,&retval); - Atom *data = (Atom *)retval; - for (; j<qt_xdnd_max_type && j < (int)n; j++) { - qt_xdnd_types[j] = data[j]; - } - if (data) + if (retval) { + Atom *data = (Atom *)retval; + for (; j<qt_xdnd_max_type && j < (int)n; j++) { + qt_xdnd_types[j] = data[j]; + } XFree((uchar*)data); + } } else { // get the types from the message int i; |