Blame SOURCES/0004-gnome-documents-hold-solarmutex-on-dtor-patch-as-wel.patch

dc0b3e
From 710bbe401ada2cbcb18f5923635809566e748351 Mon Sep 17 00:00:00 2001
f325b2
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
f325b2
Date: Mon, 8 May 2017 15:51:46 +0100
dc0b3e
Subject: [PATCH 4/5] gnome-documents: hold solarmutex on dtor patch as well
f325b2
MIME-Version: 1.0
f325b2
Content-Type: text/plain; charset=UTF-8
f325b2
Content-Transfer-Encoding: 8bit
f325b2
f325b2
Change-Id: I75fe71612116d435606c37185bf55b450425fc25
f325b2
Reviewed-on: https://gerrit.libreoffice.org/37396
f325b2
Tested-by: Jenkins <ci@libreoffice.org>
f325b2
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
f325b2
Tested-by: Caolán McNamara <caolanm@redhat.com>
f325b2
(cherry picked from commit 899ffa4c4c66702e2a65f4065cbb7970d0e9c0e2)
f325b2
---
f325b2
 include/comphelper/unique_disposing_ptr.hxx | 6 ++++++
f325b2
 1 file changed, 6 insertions(+)
f325b2
f325b2
diff --git a/include/comphelper/unique_disposing_ptr.hxx b/include/comphelper/unique_disposing_ptr.hxx
dc0b3e
index c986b12..324b7ae 100644
f325b2
--- a/include/comphelper/unique_disposing_ptr.hxx
f325b2
+++ b/include/comphelper/unique_disposing_ptr.hxx
dc0b3e
@@ -177,6 +177,12 @@ public:
f325b2
         SolarMutexGuard aGuard;
f325b2
         unique_disposing_ptr<T>::reset(p);
f325b2
     }
f325b2
+
f325b2
+    virtual ~unique_disposing_solar_mutex_reset_ptr() override
f325b2
+    {
f325b2
+        if (unique_disposing_ptr<T>::get() && comphelper::SolarMutex::get())
f325b2
+            reset();
f325b2
+    }
f325b2
 };
f325b2
 
f325b2
 }
f325b2
-- 
f325b2
2.9.3
f325b2