vimode: Don't crash when given a range for a nonexistent command.
Patch by Francis Herne.
When entering a range for a nonexistent command ,p is dereferenced before the null check.
Move that check to before p is used.
BUG: 360418
Differential Revision: D1684