summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llthread.h')
-rw-r--r--indra/llcommon/llthread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index c2f4184a8a..0d22bc863d 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -262,9 +262,9 @@ public:
// so that two threads who get into the if in parallel
// don't both attempt to the delete.
//
- if (mRef == 1)
- delete this;
mRef--;
+ if (mRef == 0)
+ delete this;
if (sMutex) sMutex->unlock();
return 0;
}