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

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