Don't crash on empty selections.

Happens for example if the selected selection model is deleted.
Merge remote-tracking branch 'origin/1.3'

Conflicts:
	core/tools/selectionmodelinspector/selectionmodelinspector.cpp