summaryrefslogtreecommitdiff
path: root/src/desktop/Window.cpp
diff options
context:
space:
mode:
authornyx <nnyyxxxx@protonmail.com>2025-04-08 13:43:15 -0400
committerGitHub <noreply@github.com>2025-04-08 19:43:15 +0200
commitea852965ffd4bf2bd2a74c0e821ba6190021eb31 (patch)
treeed7b37128e1f9f646cf8f3aee53ba97ad0cd1043 /src/desktop/Window.cpp
parent260d8e1f71b1dc6f3f354747debdc87d96b9e99f (diff)
xdg-shell: fix some null refs (#9992)
Diffstat (limited to 'src/desktop/Window.cpp')
-rw-r--r--src/desktop/Window.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index 100300d4..4b9a07fc 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -1237,7 +1237,7 @@ void CWindow::setSuspended(bool suspend) {
if (suspend == m_bSuspended)
return;
- if (m_bIsX11 || !m_pXDGSurface->toplevel)
+ if (m_bIsX11 || !m_pXDGSurface || !m_pXDGSurface->toplevel)
return;
m_pXDGSurface->toplevel->setSuspeneded(suspend);
@@ -1687,7 +1687,7 @@ Vector2D CWindow::requestedMinSize() {
Vector2D CWindow::requestedMaxSize() {
constexpr int NO_MAX_SIZE_LIMIT = 99999;
- if (((m_bIsX11 && !m_pXWaylandSurface->sizeHints) || (!m_bIsX11 && !m_pXDGSurface->toplevel) || m_sWindowData.noMaxSize.valueOrDefault()))
+ if (((m_bIsX11 && !m_pXWaylandSurface->sizeHints) || (!m_bIsX11 && (!m_pXDGSurface || !m_pXDGSurface->toplevel)) || m_sWindowData.noMaxSize.valueOrDefault()))
return Vector2D(NO_MAX_SIZE_LIMIT, NO_MAX_SIZE_LIMIT);
Vector2D maxSize = m_bIsX11 ? Vector2D(m_pXWaylandSurface->sizeHints->max_width, m_pXWaylandSurface->sizeHints->max_height) : m_pXDGSurface->toplevel->layoutMaxSize();