diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-09-16 13:32:17 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-09-16 13:32:17 (GMT) |
commit | 51d2e7756e33ee510fdcf53d5e2ae6f96f2b1c70 (patch) | |
tree | 33956089ee0e2d063e3890d6386778da090b9c06 /src | |
parent | 7870eeb33d9a16bf28a8e0d6d5bbfd4473b54b91 (diff) | |
download | Qt-51d2e7756e33ee510fdcf53d5e2ae6f96f2b1c70.zip Qt-51d2e7756e33ee510fdcf53d5e2ae6f96f2b1c70.tar.gz Qt-51d2e7756e33ee510fdcf53d5e2ae6f96f2b1c70.tar.bz2 |
Don't crash on exit if the X11 clipboard owner has not been created.
Owner can be null, don't try to deref it if it is.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qclipboard_x11.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qclipboard_x11.cpp b/src/gui/kernel/qclipboard_x11.cpp index 5495bfe..9621944 100644 --- a/src/gui/kernel/qclipboard_x11.cpp +++ b/src/gui/kernel/qclipboard_x11.cpp @@ -916,7 +916,8 @@ bool QClipboard::event(QEvent *e) // That means application exits and we need to give clipboard // content to the clipboard manager. // First we check if there is a clipboard manager. - if (XGetSelectionOwner(X11->display, ATOM(CLIPBOARD_MANAGER)) == XNone) + if (XGetSelectionOwner(X11->display, ATOM(CLIPBOARD_MANAGER)) == XNone + || !owner) return true; Window ownerId = owner->internalWinId(); |