diff options
| author | Aleix Pol <aleixpol@kde.org> | 2023-03-06 01:11:45 +0100 |
|---|---|---|
| committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2023-03-06 09:13:55 +0000 |
| commit | a20ee861d673bb3475a9b5c94743c448a9ac8d52 (patch) | |
| tree | 90fb43cd09898fee0f8dac6e33a746debd56195c /src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | |
| parent | be98a978e003272f2892e928abe7dcfdb23fd914 (diff) | |
client: Do not cast placeholder screens to QWaylandScreen
It's wrong to C-cast an object to a class that isn't theirs. Check if it
is a placeholder first.
Pick-to: 5.15 6.2 6.5
Change-Id: I45d3c423422ae6638a033fb0f4cfefc7cd4460f0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandnativeinterface.cpp')
| -rw-r--r-- | src/plugins/platforms/wayland/qwaylandnativeinterface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp index 2c1cdb98b09..65272f3c228 100644 --- a/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp +++ b/src/plugins/platforms/wayland/qwaylandnativeinterface.cpp @@ -159,7 +159,7 @@ void *QWaylandNativeInterface::nativeResourceForScreen(const QByteArray &resourc { QByteArray lowerCaseResource = resourceString.toLower(); - if (lowerCaseResource == "output") + if (lowerCaseResource == "output" && !screen->handle()->isPlaceholder()) return ((QWaylandScreen *) screen->handle())->output(); return nullptr; |
