Fix crash for pressing Ctrl+C in a message box

This fixes a regression introduced with e34dccc9e

Task-number: QTBUG-31635
Change-Id: I7c991f3b98f5c51e5fb3c12db04d3ace7be87010
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
This commit is contained in:
Kai Koehne 2013-06-12 12:46:13 +02:00 committed by The Qt Project
parent 2d9cd8eef8
commit eab6700ec0

View File

@ -1392,7 +1392,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
#if !defined(QT_NO_TEXTEDIT) #if !defined(QT_NO_TEXTEDIT)
if (e == QKeySequence::Copy) { if (e == QKeySequence::Copy) {
if (d->detailsText->isVisible() && d->detailsText->copy()) { if (d->detailsText && d->detailsText->isVisible() && d->detailsText->copy()) {
e->setAccepted(true); e->setAccepted(true);
return; return;
} }