summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-10 13:39:31 +0200
committerNoel Grandin <noel@peralex.com>2016-06-10 13:40:24 +0200
commit7846169215aa5f7bfe78ce1050638d63cf6e412c (patch)
treef76eba39b8e5b8b89fb821eb5d50b1b35f90b002 /svx
parent9b49e1817d4d045b724aed6267f8f00c6bf295cc (diff)
dispose of ImplEscherExSdr correctly
to remove the warnings messages, and turn the warn into an assert to prevent it coming back Change-Id: Ie754ac07f8bb505439a1194f843d09c396353aa6
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/unopage.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index c7bbd9670827..e2afa104901e 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -80,7 +80,7 @@ SvxDrawPage::~SvxDrawPage() throw()
{
if( !mrBHelper.bDisposed )
{
- SAL_WARN("svx", "SvxDrawPage must be disposed!");
+ assert("SvxDrawPage must be disposed!");
acquire();
dispose();
}
@@ -124,13 +124,13 @@ void SvxDrawPage::dispose()
// Remark: It is an error to call dispose more than once
bool bDoDispose = false;
{
- osl::MutexGuard aGuard( mrBHelper.rMutex );
- if( !mrBHelper.bDisposed && !mrBHelper.bInDispose )
- {
- // only one call go into this section
- mrBHelper.bInDispose = true;
- bDoDispose = true;
- }
+ osl::MutexGuard aGuard( mrBHelper.rMutex );
+ if( !mrBHelper.bDisposed && !mrBHelper.bInDispose )
+ {
+ // only one call go into this section
+ mrBHelper.bInDispose = true;
+ bDoDispose = true;
+ }
}
// Do not hold the mutex because we are broadcasting
@@ -153,13 +153,13 @@ void SvxDrawPage::dispose()
// catch exception and throw again but signal that
// the object was disposed. Dispose should be called
// only once.
+ osl::MutexGuard aGuard( mrBHelper.rMutex );
mrBHelper.bDisposed = true;
mrBHelper.bInDispose = false;
throw;
}
- // the values bDispose and bInDisposing must set in this order.
- // No multithread call overcome the "!rBHelper.bDisposed && !rBHelper.bInDispose" guard.
+ osl::MutexGuard aGuard( mrBHelper.rMutex );
mrBHelper.bDisposed = true;
mrBHelper.bInDispose = false;
}