fix crash found when exploring fdo#50697

(cherry picked from commit b25871da62facc20387ebfa2b908422578ca8ce9)

Conflicts:
	sw/source/core/frmedt/fefly1.cxx

Change-Id: Ie781c2534cb41104dd3d91d4370639e98baa8112
Reviewed-on: https://gerrit.libreoffice.org/9202
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>