Skip to content

Commit 75a1f04

Browse files
committed
fix: crash on wayland when global shortcut is set
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent 5bd6aa5 commit 75a1f04

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

QHotkey/qhotkey_x11.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ quint32 QHotkeyPrivateX11::nativeKeycode(Qt::Key keycode, bool &ok)
132132

133133
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
134134
const QNativeInterface::QX11Application *x11Interface = qGuiApp->nativeInterface<QNativeInterface::QX11Application>();
135+
if (!x11Interface)
136+
return 0;
135137
Display *display = x11Interface->display();
136138
#else
137139
const bool x11Interface = QX11Info::isPlatformX11();

0 commit comments

Comments
 (0)