summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qdnd_x11.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-08-19 11:57:27 (GMT)
committerGareth Stockwell <gareth.stockwell@sosco.com>2009-08-19 11:57:27 (GMT)
commitd9e03376f9f82e5664dfd2446ff4c05e35ffb535 (patch)
tree711f77f7d307c05a3ae310b1fd59bbce74bd8eab /src/gui/kernel/qdnd_x11.cpp
parent98d4c657803d5f1956560bd9b62e73f15c05e8fd (diff)
parentca0b5b503e8865c0eedeea86aa132291281fc49f (diff)
downloadQt-d9e03376f9f82e5664dfd2446ff4c05e35ffb535.zip
Qt-d9e03376f9f82e5664dfd2446ff4c05e35ffb535.tar.gz
Qt-d9e03376f9f82e5664dfd2446ff4c05e35ffb535.tar.bz2
Merged in DummyPlayer changes
Diffstat (limited to 'src/gui/kernel/qdnd_x11.cpp')
-rw-r--r--src/gui/kernel/qdnd_x11.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp
index 7b445ea..a4042c1 100644
--- a/src/gui/kernel/qdnd_x11.cpp
+++ b/src/gui/kernel/qdnd_x11.cpp
@@ -34,7 +34,7 @@
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
+** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -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;