--warning: Don't try to connect to a null object

It happens when running without libinput.
This commit is contained in:
Aleix Pol 2021-02-18 20:02:37 +01:00
parent 8950b78121
commit 4fb2493826

View file

@ -61,6 +61,9 @@ public:
, m_parent(parent)
{
auto c = LibInput::Connection::self();
if (!c) {
return;
}
connect(c, &LibInput::Connection::deviceAdded, this, &TabletModeTouchpadRemovedSpy::refresh);
connect(c, &LibInput::Connection::deviceRemoved, this, &TabletModeTouchpadRemovedSpy::refresh);