Fix for long-forgotten selection validation.

Had someone not set a previous selection, things could get nasty...
Merge pull request #964 from RlonRyan/patch-2

Fix for long-forgotten selection validation.