diff --git a/autotests/libinput/key_event_test.cpp b/autotests/libinput/key_event_test.cpp index a5577d0aff..4f22008d1e 100644 --- a/autotests/libinput/key_event_test.cpp +++ b/autotests/libinput/key_event_test.cpp @@ -76,6 +76,9 @@ void TestLibinputKeyEvent::testCreate() // verify it's a key event QVERIFY(dynamic_cast(event.data())); QCOMPARE((libinput_event_keyboard*)(*dynamic_cast(event.data())), keyEvent); + + // verify that a nullptr passed to Event::create returns a nullptr + QVERIFY(!Event::create(nullptr)); } void TestLibinputKeyEvent::testEvent_data()