filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 30a390779d4629fcaa6fec27d44cdb08467173ae
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Oct 9 14:41:28 2025 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Fri Oct 10 09:31:05 2025 +0200

    allow 'URL' not to exist
    
    Change-Id: Ifb92d62b1b2eab82eb363300e99d3369b5b477b4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192119
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx 
b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 4af3f7224b3e..6f74e5d8ac0a 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -270,7 +270,8 @@ bool XmlFilterAdaptor::exportImpl( const Sequence< 
css::beans::PropertyValue >&
 
         // get the base URI, so we can use relative links
         OUString aBaseURI;
-        if (aMediaMap.find(u"URL"_ustr)->second >>= aBaseURI)
+        auto it = aMediaMap.find(u"URL"_ustr);
+        if (it != aMediaMap.end() && (it->second >>= aBaseURI))
         {
             INetURLObject aURLObj(aBaseURI);
             // base URI in this case is the URI of the actual saving location

Reply via email to