From 1adca0df053efdbf55a40680b32dbad61b99bb08 Mon Sep 17 00:00:00 2001
From: Shon Ferguson <shonferg@users.sourceforge.net>
Date: Fri, 2 Jun 2006 06:20:48 +0000
Subject: [PATCH] Fixed a reference counting error.

---
 obj/NiObject.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/obj/NiObject.cpp b/obj/NiObject.cpp
index 7e93d447..1355b011 100644
--- a/obj/NiObject.cpp
+++ b/obj/NiObject.cpp
@@ -35,7 +35,7 @@ void NiObject::AddRef() {
 void NiObject::SubtractRef() {
 	--_ref_count;
 
-	if ( _ref_count < 1 ) {
+	if ( _ref_count < 0 ) {
 		delete this;
 	}
 }
-- 
GitLab