diff options
-rw-r--r-- | include/vcl/transfer.hxx | 3 | ||||
-rw-r--r-- | vcl/source/treelist/transfer2.cxx | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx index 75d81f5fa5db..0b13f504926c 100644 --- a/include/vcl/transfer.hxx +++ b/include/vcl/transfer.hxx @@ -41,6 +41,7 @@ #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> #include <com/sun/star/embed/Aspects.hpp> #include <memory> +#include <mutex> namespace com::sun::star::datatransfer::dnd { class XDragGestureRecognizer; } namespace com::sun::star::io { class XInputStream; } @@ -399,7 +400,7 @@ private: friend class DragSourceHelper::DragGestureListener; private: - osl::Mutex maMutex; + std::mutex maMutex; css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > mxDragGestureRecognizer; css::uno::Reference< css::datatransfer::dnd::XDragGestureListener > mxDragGestureListener; diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx index bc654bbb7975..fb7877e60ff1 100644 --- a/vcl/source/treelist/transfer2.cxx +++ b/vcl/source/treelist/transfer2.cxx @@ -83,9 +83,8 @@ void DragSourceHelper::dispose() { Reference<XDragGestureRecognizer> xTmp; { - osl::MutexGuard aGuard( maMutex ); - xTmp = mxDragGestureRecognizer; - mxDragGestureRecognizer.clear(); + std::lock_guard aGuard( maMutex ); + xTmp = std::move(mxDragGestureRecognizer); } if( xTmp.is() ) xTmp->removeDragGestureListener( mxDragGestureListener ); |