Fixes crash in Model::scaleToFit()
Merge pull request #3437 from Atlante45/fix_attachments_scale_to_fit_crash

Fixes crash in Model::scaleToFit()