Fix crash in copy when no data is selected

Authored by danders on Feb 25 2020, 9:20 AM.