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>
This commit is contained in:
parent
be98a978e0
commit
a20ee861d6
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user