xcb: avoid a usage of invalid reply in qxcbdrag
Fixes: QTBUG-83446 Pick-to: 5.15 Change-Id: I1f148c611dcab6cad951ddd934072933fef75452 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
7b76379a89
commit
e80767d1fc
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user