Don't crash on empty selections.

Happens for example if the selected selection model is deleted.