diff --git a/examples/placeholder/linux/include/TestCommand.h b/examples/placeholder/linux/include/TestCommand.h index 2ef81055b8b59b..373a96a264fa66 100644 --- a/examples/placeholder/linux/include/TestCommand.h +++ b/examples/placeholder/linux/include/TestCommand.h @@ -74,11 +74,11 @@ class TestCommand { case chip::DeviceLayer::DeviceEventType::kCommissioningComplete: ChipLogProgress(chipTool, "Commissioning complete"); - chip::DeviceLayer::PlatformMgr().RemoveEventHandler(OnPlatformEvent, arg); TestCommand * command = reinterpret_cast(arg); command->isRunning = true; command->NextTest(); + chip::DeviceLayer::PlatformMgr().RemoveEventHandler(OnPlatformEvent, arg); break; } }