Browse Source

Fix assert conditional in consoleNamespace.cc

mRefCountToParent  is always greater or equals to zero, because is
unsigned. Need to check the mRefCountToParent first.
Mikhail 12 years ago
parent
commit
f1b553e0a4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      engine/source/console/consoleNamespace.cc

+ 1 - 1
engine/source/console/consoleNamespace.cc

@@ -161,8 +161,8 @@ bool Namespace::unlinkClass(Namespace *parent)
       return false;
       return false;
    }
    }
 
 
+   AssertFatal(mRefCountToParent > 0, "Namespace::unlinkClass - reference count to parent is less than 0");
    mRefCountToParent--;
    mRefCountToParent--;
-   AssertFatal(mRefCountToParent >= 0, "Namespace::unlinkClass - reference count to parent is less than 0");
 
 
    if(mRefCountToParent == 0)
    if(mRefCountToParent == 0)
       walk->mParent = NULL;
       walk->mParent = NULL;