Fix warning about nullptr sender in QObject::connect()

When one sets "no border" property, the decoration can be null.
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent 236baa63df
commit 012c64b054
  1. 12
      src/xdgshellwindow.cpp

@ -707,11 +707,13 @@ void XdgToplevelWindow::handleRolePrecommit()
{
auto configureEvent = static_cast<XdgToplevelConfigure *>(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();

Loading…
Cancel
Save