ucb/source/ucp/webdav-curl/webdavcontent.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit f529a81a6158de68c0a244640f8ee6434e6e79a6
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Oct 12 16:32:59 2021 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Nov 1 18:55:02 2021 +0100

    ucb: webdav-curl: Don't crash when accessing WebDAV resource after auth 
failed
    
    [ replicate part of commit 162a472d55cf9fb9aaa6d5eae625b3da2273a516 ]
    
    Change-Id: Ia48b95d27cc9da8688104a05a758f82415a2d2dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123506
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 75f9d0ca2ae9..1fadd4560331 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -1592,12 +1592,10 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 
         if ( eType == DAV )
         {
-            //xProps.reset(
-            //    new ContentProperties( aUnescapedTitle ) );
-            xProps->addProperty(
-                "Title",
-                uno::makeAny( aUnescapedTitle ),
-                true );
+            if (!xProps)
+                xProps.reset(new ContentProperties(aUnescapedTitle));
+            else
+                xProps->addProperty("Title", uno::makeAny(aUnescapedTitle), 
true);
         }
         else
         {

Reply via email to