diff options
author | Eike Rathke <erack@redhat.com> | 2012-07-16 17:49:14 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-17 16:40:29 +0200 |
commit | 581860f47173a3ebc8f834d229e8d2878aaf12ba (patch) | |
tree | f088504161e73980ed1c52530c44849b050c8411 | |
parent | b1032a684c0ddb1fd1aabe979517897f4ba91dd7 (diff) |
tubes: guard unref() against "accidental" calls
Change-Id: I73b0f8faaa9b6d0707153f3150ca531a33cb0dd3
-rw-r--r-- | tubes/source/manager.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx index b026d85a4da1..896fcc8c0cf3 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; } |