summaryrefslogtreecommitdiff
path: root/src/desktop/LayerSurface.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-07-26 11:46:00 +0200
committerVaxry <vaxry@vaxry.net>2025-07-26 11:46:07 +0200
commite1fff05d0db9c266679ec7ea1b5734c73d6b0a57 (patch)
tree174e4073c282ad69923f16bebf1a05fe5f802439 /src/desktop/LayerSurface.cpp
parent5c8d675eedcd836cbb0d4eeadf203efc7f73752b (diff)
layerSurface: check for monitor validity in startAnimation
ref #11168 sometimes on exit monitor might be null
Diffstat (limited to 'src/desktop/LayerSurface.cpp')
-rw-r--r--src/desktop/LayerSurface.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp
index 36ec030b..0faa47d2 100644
--- a/src/desktop/LayerSurface.cpp
+++ b/src/desktop/LayerSurface.cpp
@@ -470,9 +470,14 @@ void CLayerSurface::startAnimation(bool in, bool instant) {
const auto PMONITOR = g_pCompositor->getMonitorFromVector(MIDDLE);
- int force = -1;
+ if (!PMONITOR) { // can rarely happen on exit
+ m_alpha->setValueAndWarp(in ? 1.F : 0.F);
+ return;
+ }
+
+ int force = -1;
- CVarList args(ANIMSTYLE, 0, 's');
+ CVarList args(ANIMSTYLE, 0, 's');
if (args.size() > 1) {
const auto ARG2 = args[1];
if (ARG2 == "top")