[Libreoffice-commits] .: Branch 'feature/tubes' - tubes/source

Eike Rathke erack at kemper.freedesktop.org
Mon Jul 16 08:49:22 PDT 2012


 tubes/source/manager.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b0a30d372fb9430c052177a1a551cd3b771236dd
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jul 16 17:49:14 2012 +0200

    tubes: guard unref() against "accidental" calls
    
    Change-Id: I73b0f8faaa9b6d0707153f3150ca531a33cb0dd3

diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index b026d85..896fcc8 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -372,7 +372,7 @@ void
 TeleManager::unref()
 {
     MutexGuard aGuard( GetAnotherMutex());
-    if (--nAnotherRefCount == 0) {
+    if (nAnotherRefCount && --nAnotherRefCount == 0) {
         delete pSingleton;
         pSingleton = NULL;
     }


More information about the Libreoffice-commits mailing list