Browse Source

Fixes an optimization bug producing #INF in the egg file. Added check to make sure data isn't empty. This might be an issue only found in VS2008 SP1.

Bei Yang 15 years ago
parent
commit
846505743d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      panda/src/egg/eggSAnimData.cxx

+ 3 - 1
panda/src/egg/eggSAnimData.cxx

@@ -39,7 +39,9 @@ optimize() {
     }
 
     // Ok, all the rows had the same value.  Collapse them.
-    _data.erase(_data.begin() + 1, _data.end());
+	if(!_data.empty()){
+		_data.erase(_data.begin() + 1, _data.end());
+	}
   }
 }