summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index 3e24027e51..837ad2ca5a 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -419,11 +419,12 @@ void QXcbDrag::move(const QPoint &globalPos, Qt::MouseButtons b, Qt::KeyboardMod
auto reply = Q_XCB_REPLY(xcb_get_property, xcb_connection(),
false, proxy_target,
atom(QXcbAtom::XdndAware), XCB_GET_PROPERTY_TYPE_ANY, 0, 1);
- if (!reply || reply->type == XCB_NONE)
+ if (!reply || reply->type == XCB_NONE) {
target = 0;
-
- target_version = *(uint32_t *)xcb_get_property_value(reply.get());
- target_version = qMin(xdnd_version, target_version ? target_version : 1);
+ } else {
+ target_version = *(uint32_t *)xcb_get_property_value(reply.get());
+ target_version = qMin(xdnd_version, target_version ? target_version : 1);
+ }
}
if (target != current_target) {