Resolves: fdo#87108 crash on saving fodg

Change-Id: Ib88f0e9b0a3ba229c9e9f6cf20831c16051e3e29
(cherry picked from commit bfd63516c9fd4ec366576f9a0e3c456bc3d530a3)