summaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2023-11-01 18:53:36 +0000
committerGitHub <noreply@github.com>2023-11-01 18:53:36 +0000
commit21e9313c100e005ec2a9a5100c29258a2885546b (patch)
treedcda791982f3aa2b3e4939be67cdda11fd7023e3 /src/Window.cpp
parent7b32b4214d028a173c8192bddaa9e43503326080 (diff)
Core: various unsafe state improvements (#3713)
Fixes #3637
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index 77960dc6..2f0809bf 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -223,6 +223,9 @@ pid_t CWindow::getPID() {
wl_client_get_credentials(wl_resource_get_client(m_uSurface.xdg->resource), &PID, nullptr, nullptr);
} else {
+ if (!m_bIsMapped || !m_bMappedX11)
+ return -1;
+
PID = m_uSurface.xwayland->pid;
}