diff options
Diffstat (limited to 'src/widgets/widgets/qlabel.cpp')
-rw-r--r-- | src/widgets/widgets/qlabel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp index e3225800cc..46afac700a 100644 --- a/src/widgets/widgets/qlabel.cpp +++ b/src/widgets/widgets/qlabel.cpp @@ -964,6 +964,8 @@ bool QLabel::event(QEvent *e) QShortcutEvent *se = static_cast<QShortcutEvent *>(e); if (se->shortcutId() == d->shortcutId) { QWidget * w = d->buddy; + if (!w) + return QFrame::event(e); if (w->focusPolicy() != Qt::NoFocus) w->setFocus(Qt::ShortcutFocusReason); #if QT_CONFIG(abstractbutton) |