소스 검색

Inifinite loop on bad import files

I had an import file that caused an infinite loop. I don't exactly know how this algorithm works here but maybe we should change it more.
Probably calculate the amount of steps and chop linear.
tanolino 3 년 전
부모
커밋
002d6dc016
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      code/AssetLib/FBX/FBXConverter.cpp

+ 4 - 0
code/AssetLib/FBX/FBXConverter.cpp

@@ -3325,6 +3325,10 @@ FBXConverter::KeyFrameListList FBXConverter::GetRotationKeyframeList(const std::
                             Keys->push_back(tnew);
                             Keys->push_back(tnew);
                             Values->push_back(vnew);
                             Values->push_back(vnew);
                         }
                         }
+                        else {
+                            // Something broke
+                            break;
+                        }
                         tp = tnew;
                         tp = tnew;
                         vp = vnew;
                         vp = vnew;
                     }
                     }