Ver Fonte

Fix assert conditional in consoleNamespace.cc

mRefCountToParent  is always greater or equals to zero, because is
unsigned. Need to check the mRefCountToParent first.
Mikhail há 12 anos atrás
pai
commit
f1b553e0a4
1 ficheiros alterados com 1 adições e 1 exclusões
  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;
    }
 
+   AssertFatal(mRefCountToParent > 0, "Namespace::unlinkClass - reference count to parent is less than 0");
    mRefCountToParent--;
-   AssertFatal(mRefCountToParent >= 0, "Namespace::unlinkClass - reference count to parent is less than 0");
 
    if(mRefCountToParent == 0)
       walk->mParent = NULL;