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

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