diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-09-27 12:47:11 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-28 03:17:13 +0200 |
commit | 187184b6c7483c50525fcb3d7e0b3e7371e20b18 (patch) | |
tree | 0e71438bba4ac804dea7937735728c836856705d | |
parent | 926d6189bf4f954b80b2a019d8bde5f85d4d2b4c (diff) |
Prevent potential crash in QXcbConnection::checkEvent().
Change-Id: I4b2ed85fecbfc1cc4fecfa9bb37aa0d9bd329817
Reviewed-on: http://codereview.qt-project.org/5616
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index f7642fa9c9..32919eed20 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -679,7 +679,7 @@ xcb_generic_event_t *QXcbConnection::checkEvent(int type) for (int i = 0; i < eventqueue->size(); ++i) { xcb_generic_event_t *event = eventqueue->at(i); - if (event->response_type == type) { + if (event && event->response_type == type) { (*eventqueue)[i] = 0; m_reader->unlock(); return event; |