diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index 9e08aba4a5..6b13df5b1f 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -707,11 +707,13 @@ void XdgToplevelWindow::handleRolePrecommit() { auto configureEvent = static_cast(lastAcknowledgedConfigure()); if (configureEvent && decoration() != configureEvent->decoration.get()) { - connect(configureEvent->decoration.get(), &KDecoration2::Decoration::bordersChanged, this, [this]() { - if (!isDeleted()) { - scheduleConfigure(); - } - }); + if (configureEvent->decoration) { + connect(configureEvent->decoration.get(), &KDecoration2::Decoration::bordersChanged, this, [this]() { + if (!isDeleted()) { + scheduleConfigure(); + } + }); + } setDecoration(configureEvent->decoration); updateShadow();