From f3fc127dc007f32355859ae4fc7d34916c500a18 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sun, 7 Apr 2019 16:00:31 +0100 Subject: Use osl_atomic_increment/osl_atomic_decrement to change m_refCount Change-Id: Ia24441d3671102fdeeb797547396c25ee2a6ffd3 Reviewed-on: https://gerrit.libreoffice.org/70382 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sw/source/uibase/uno/unotxvw.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source/uibase/uno/unotxvw.cxx') diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index dd4b8c148d32..2be21959a05a 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -120,7 +120,7 @@ void SwXTextView::Invalidate() mxTextViewCursor.clear(); } - m_refCount++; //prevent second d'tor call + osl_atomic_increment(&m_refCount); //prevent second d'tor call { uno::Reference const xInt(static_cast< @@ -129,7 +129,7 @@ void SwXTextView::Invalidate() m_SelChangedListeners.disposeAndClear(aEvent); } - m_refCount--; + osl_atomic_decrement(&m_refCount); m_pView = nullptr; } -- cgit