diff options
Diffstat (limited to 'src/frontend/qt_sdl')
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index cd0ea52..bea8c6d 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -1325,8 +1325,12 @@ std::optional<WindowInfo> ScreenPanelGL::getWindowInfo() else if (platform_name == QStringLiteral("wayland")) { wi.type = WindowInfo::Type::Wayland; - wi.display_connection = pni->nativeResourceForWindow("display", windowHandle()); - wi.window_handle = pni->nativeResourceForWindow("surface", windowHandle()); + QWindow* handle = windowHandle(); + if (handle == nullptr) + return std::nullopt; + + wi.display_connection = pni->nativeResourceForWindow("display", handle); + wi.window_handle = pni->nativeResourceForWindow("surface", handle); } else { |