diff --git a/plugins/mousepad/mousepadplugin.cpp b/plugins/mousepad/mousepadplugin.cpp index 76eb01b81..820737b2c 100644 --- a/plugins/mousepad/mousepadplugin.cpp +++ b/plugins/mousepad/mousepadplugin.cpp @@ -82,7 +82,9 @@ bool MousepadPlugin::receivePacket(const NetworkPacket& np) void MousepadPlugin::connected() { NetworkPacket np(PACKET_TYPE_MOUSEPAD_KEYBOARDSTATE); - np.set(QStringLiteral("state"), m_impl->hasKeyboardSupport()); + if (m_impl) { + np.set(QStringLiteral("state"), m_impl->hasKeyboardSupport()); + } sendPacket(np); } diff --git a/tests/devicetest.cpp b/tests/devicetest.cpp index fdc62c3cc..682354a84 100644 --- a/tests/devicetest.cpp +++ b/tests/devicetest.cpp @@ -94,6 +94,9 @@ void DeviceTest::testPairedDevice() void DeviceTest::testUnpairedDevice() { + KdeConnectConfig* kcc = KdeConnectConfig::instance(); + kcc->removeTrustedDevice(deviceId); + LanLinkProvider linkProvider; QSslSocket socket; LanDeviceLink* link = new LanDeviceLink(deviceId, &linkProvider, &socket, LanDeviceLink::Locally);