command: fix null pointer dereference in idle mode

Pressing 'h' in idle mode -> crash.