Blob Blame History Raw
From 579be121f66fa720cbb8ab2e688ea3aa41dc59b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 13 Mar 2017 12:44:10 +0000
Subject: [PATCH] Resolves: rhbz#1431540 crash in
 SwDBManager::releaseRevokeListener

Change-Id: I8e61163de7e6192bdf613ab6b58906326499d6c2
---
 sw/source/uibase/dbui/dbmgr.cxx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 7be5340..253d4e9 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -3058,8 +3058,11 @@ SwDoc* SwDBManager::getDoc() const
 
 void SwDBManager::releaseRevokeListener()
 {
-    pImpl->m_xDataSourceRemovedListener->Dispose();
-    pImpl->m_xDataSourceRemovedListener.clear();
+    if (pImpl->m_xDataSourceRemovedListener.is())
+    {
+        pImpl->m_xDataSourceRemovedListener->Dispose();
+        pImpl->m_xDataSourceRemovedListener.clear();
+    }
 }
 
 SwConnectionDisposedListener_Impl::SwConnectionDisposedListener_Impl(SwDBManager& rManager)
-- 
2.9.3