diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2019-03-05 10:49:10 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2019-03-06 07:59:50 +0000 |
commit | 856fb1ab44722f5165fb6b5dec0bd748006acd10 (patch) | |
tree | d7899197d103df24f9e99a6a20644909b2f29b0c | |
parent | e8d3306c8f86bf21648693521d8be91bb8f1335e (diff) |
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index 524af5a2a7..6f3584f509 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -412,12 +412,15 @@ void *QXcbNativeInterface::atspiBus() auto reply = Q_XCB_REPLY(xcb_get_property, defaultConnection->xcb_connection(), false, defaultConnection->rootWindow(), atspiBusAtom, XCB_ATOM_STRING, 0, 128); - Q_ASSERT(!reply->bytes_after); + if (!reply) + return nullptr; + char *data = (char *)xcb_get_property_value(reply.get()); int length = xcb_get_property_value_length(reply.get()); return new QByteArray(data, length); } - return 0; + + return nullptr; } void QXcbNativeInterface::setAppTime(QScreen* screen, xcb_timestamp_t time) |