Resolves: fdo#60132 Error reading file after inserting comment

Change-Id: Ib2b388c78c8f44a626267c2f8d3975b46ead3bd5
(cherry picked from commit 165a53f3a7f08e65055e08ecd4cfc068c5d353b8)
Reviewed-on: https://gerrit.libreoffice.org/2041
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 30dadc7..8f27931 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3782,6 +3782,11 @@ void XMLAnnotationImportContext::PrepareField(
        while (xFields->hasMoreElements())
        {
            uno::Reference<beans::XPropertySet> xCurrField(xFields->nextElement(), uno::UNO_QUERY);
            uno::Reference<beans::XPropertySetInfo> xPropsInfo(xCurrField->getPropertySetInfo());

            if (!xPropsInfo->hasPropertyByName(sPropertyName))
                continue;

            OUString aFieldName;
            xCurrField->getPropertyValue(sPropertyName) >>= aFieldName;
            if (aFieldName == aName)